<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: SysPm        (System Power Management)</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__syspm.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#groups">API Reference</a>  </div>
  <div class="headertitle">
<div class="title">SysPm (System Power Management)</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>Use the System Power Management (SysPm) driver to change power modes and reduce system power consumption in power sensitive designs. </p>
<p>The functions and other declarations used in this driver are in cy_syspm.h. You can include cy_pdl.h to get access to all functions and declarations in the PDL.</p>
<p>For multi-CPU devices, this library allows you to individually enter low power modes for each CPU.</p>
<p>This document contains the following topics:</p>
<ul>
<li><a class="el" href="group__group__syspm.html#group_syspm_power_modes">Power Modes</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_system_power_modes">System Power Modes</a><ul>
<li><a class="el" href="group__group__syspm.html#group_syspm_switching_into_ulp">Switching the System into Ultra Low Power</a><ul>
<li><a class="el" href="group__group__syspm.html#group_syspm_ulp_limitations">ULP Limitations</a></li>
</ul>
</li>
<li><a class="el" href="group__group__syspm.html#group_syspm_switching_into_lp">Switching the System into Low Power</a><ul>
<li><a class="el" href="group__group__syspm.html#group_syspm_lp_limitations">LP Limitations</a></li>
</ul>
</li>
<li><a class="el" href="group__group__syspm.html#group_syspm_switching_into_sleep">Switching CPU into Sleep</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_switching_into_lpactivelpsleep">Switching the System into LPACTIVE/LPSLEEP</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_switching_into_deepsleep">Switching the System or CPU into Deep Sleep</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_switching_into_deepsleep-ram">Switching the System or CPU into Deep Sleep-RAM</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_switching_into_deepsleep-off">Switching the System or CPU into Deep Sleep-OFF</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_wakingup_from_sleep_deepsleep">Waking Up from Sleep or Deep Sleep</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_switching_into_hibernate">Switching System to Hibernate</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_wakingup_from_hibernate">Waking Up from Hibernate</a></li>
</ul>
</li>
<li><a class="el" href="group__group__syspm.html#group_syspm_system_reg_curr_mode">System Regulator Current Mode</a><ul>
<li><a class="el" href="group__group__syspm.html#group_syspm_system_set_min_reg_curr_mode">Setting Minimum System Regulator Current Mode</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_system_set_normal_reg_curr_mode">Setting Normal System Regulator Current Mode</a></li>
</ul>
</li>
<li><a class="el" href="group__group__syspm.html#group_syspm_migration_guide_for_syspm_4_0">Migration Guide: Moving to SysPm v4.0</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_managing_pmic">Managing PMIC</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_managing_backup_domain">Managing the Backup Domain</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_cb">SysPm Callbacks</a><ul>
<li><a class="el" href="group__group__syspm.html#group_syspm_cb_example">SysPm Callbacks Example</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_cb_config_consideration">Callback Configuration Considerations</a><ul>
<li><a class="el" href="group__group__syspm.html#group_syspm_cb_parameters">Callback Function Parameters</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_cb_structures">Callback Function Structure</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_cb_function_implementation">Callback Function Implementation</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_cb_flow">Callbacks Execution Flow</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_cb_registering">Callback Registering</a></li>
<li><a class="el" href="group__group__syspm.html#group_syspm_cb_unregistering">Callback Unregistering</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="el" href="group__group__syspm.html#group_syspm_definitions">Definitions</a></li>
</ul>
<h1><a class="anchor" id="group_syspm_section_configuration"></a>
Configuration Considerations</h1>
<h2><a class="anchor" id="group_syspm_power_modes"></a>
Power Modes</h2>
<p><b>A) CAT1A Architecture</b>:</p>
<p>1) PSoC 6 MCUs support four system and three CPU power modes. These power modes are intended to minimize average power consumption in an application.</p>
<p>System power modes:</p><ul>
<li><b>Low Power</b> - All peripheral and CPU power modes are available to be used at maximum device frequency and current consumption.</li>
<li><b>Ultra Low Power</b> - All peripheral and CPU power modes are available, but the frequency and current consumption are limited to a device specific number.</li>
<li><b>Deep Sleep</b> - Device and I/O states is retained. Low-frequency peripherals are available. Both CPUs are in CPU Deep Sleep power mode.</li>
<li><b>Hibernate</b> - The device and I/O states are frozen and the device resets on wakeup.</li>
</ul>
<p>CPU power modes(standard ARM defined power modes, supported by the ARM CPUs and ISA):</p>
<ul>
<li><b>Active</b></li>
<li><b>Sleep</b></li>
<li><b>Deep Sleep</b></li>
</ul>
<p><b>B) CAT1B Architecture</b>:</p>
<p>1) CAT1B devices supports below Power Modes:</p>
<ul>
<li><b>ACTIVE, SLEEP </b> - standard ARM defined power modes, supported by the ARM CPUs and ISA.</li>
<li><b>LPACTIVE/LPSLEEP</b> - are low power profiles implemented as register configurations within ACTIVE/SLEEP modes.</li>
<li><b>DEEPSLEEP </b> - a lower power mode where high-frequency clocks are disabled. Most register state is retained and the platform supports saving a configurable amount of SRAM state.</li>
<li><b>DEEPSLEEP-RAM </b> - a lower mode than DEEPSLEEP that keeps DeepSleep peripherals running, but on wakeup the CPU (and most peripherals) go through a reset. A configurable amount of system RAM is retained.</li>
<li><b>DEEPSLEEP-OFF </b> - similar to DEEPSLEEP-RAM but does not retain system RAM.</li>
<li><b>HIBERNATE </b> - is an even lower power mode than DEEPSLEEP-OFF, but on wakeup the CPU (and almost all peripherals) go through a full reset. DeepSleep peripherals do not operate in HIBERNATE.</li>
<li><b>XRES </b> - occurs when an external reset is applied, either XRES or alternate XRES (AXRES). It is also considered a power mode with a current target spec.</li>
<li><b>OFF </b> - state simply represents the state of the part with no power applied to it.</li>
</ul>
<p>CAT1B adopts the <b>ARM Power Control Architecture</b>.Below are key changes in the power system:</p>
<ul>
<li>CAT1B supports three flavors of DEEPSLEEP: the original one, and two new ones called DEEPSLEEP-RAM and DEEPSLEEP-OFF.</li>
<li>SRSS implements an ARM Power Policy Unit (PPU) that provides the software interface to power mode control for VCCACT_PD.The PPU interacts with a Power Control State Machine (PSCM) that interfaces with the core SRSS to enter/exit DEEPSLEEP*.</li>
<li>SRSS implements a Power Dependency Control Matrix (PDCM) that allows hardware and software to specify dependencies between power domains.</li>
</ul>
<p><b>C) CAT1C Architecture</b>:</p>
<p>1) CAT1C MCU's can operate in different power modes that are intended to minimize the average power consumption in an application. The power modes supported by CATC devices in the order of decreasing power consumption are:</p><ul>
<li><b>ACTIVE </b> - all peripherals are available</li>
<li><b>Low-Power Active (LPACTIVE) profile </b>- Low-power profile of Active mode where all peripherals including the CPU are available, but with limited capability</li>
<li><b>SLEEP </b> - all peripherals except the CPU are available</li>
<li><b>Low-Power Sleep (LPSLEEP) profile </b>- Low-power profile of Sleep mode where all peripherals except the CPU are available, but with limited capability</li>
<li><b>DEEPSLEEP </b>- only low-frequency peripherals are available</li>
<li><b>HIBERNATE </b>- the device and I/O states are frozen and the device resets on wakeup</li>
<li><b>XRES </b>- the device enters this state when the XRES_L pin is asserted</li>
</ul>
<p>Active, Sleep, and DeepSleep are standard Arm-defined power modes supported by the Arm CPUs and Instruction Set Architecture (ISA). LPACTIVE and LPSLEEP are similar to Active and Sleep modes, respectively; however, the high-current components are either frequency or current limited or turned off. Hibernate mode and XRES state are the lowest power mode/state that the CATC devices can be in.</p>
<h2><a class="anchor" id="group_syspm_system_power_modes"></a>
System Power Modes</h2>
<ul>
<li><b>LP</b> - In this mode, code is executed and all logic and memories are powered. Firmware may disable/reduce clocks for specific peripherals and power down specific analog power domains.</li>
<li><b>ULP</b> - This power mode is like LP mode, but with clock restrictions and limited/slower peripherals to achieve lower current consumption. Refer to <a class="el" href="group__group__syspm.html#group_syspm_switching_into_ulp">Switching the System into Ultra Low Power</a> in Configuration considerations.</li>
<li><b>LPACTIVE/LPSLEEP</b> - low power profiles implemented as register configurations within ACTIVE/SLEEP modes.Refer to <a class="el" href="group__group__syspm.html#group_syspm_switching_into_lpactivelpsleep">Switching the System into LPACTIVE/LPSLEEP</a> in Configuration considerations.</li>
<li><b>DEEPSLEEP</b> - Is a lower power mode where high-frequency clocks are disabled. Refer to <a class="el" href="group__group__syspm.html#group_syspm_switching_into_deepsleep">Switching the System or CPU into Deep Sleep</a> in Configuration considerations. Deep-sleep-capable peripherals are available. A normal wakeup from Deep Sleep returns to either system LP or ULP mode, depending on the previous state and programmed behavior for the configured wakeup interrupt. Likewise, a debug wakes up from system Deep Sleep and woken CPU returns to CPU Sleep. Refer to <a class="el" href="group__group__syspm.html#group_syspm_wakingup_from_sleep_deepsleep">Waking Up from Sleep or Deep Sleep</a> in Configuration considerations.</li>
<li><b>DEEPSLEEP-RAM</b> - a lower mode than DEEPSLEEP that keeps DeepSleep peripherals running, but on wakeup the CPU (and most peripherals) go through a reset. A configurable amount of system RAM is retained.Refer to <a class="el" href="group__group__syspm.html#group_syspm_switching_into_deepsleep-ram">Switching the System or CPU into Deep Sleep-RAM</a> in Configuration considerations. Refer to <a class="el" href="group__group__syspm.html#group_syspm_wakingup_from_sleep_deepsleep">Waking Up from Sleep or Deep Sleep</a> in Configuration considerations.</li>
<li><b>DEEPSLEEP-OFF</b> - similar to DEEPSLEEP-RAM but does not retain system RAM. Refer to <a class="el" href="group__group__syspm.html#group_syspm_switching_into_deepsleep-off">Switching the System or CPU into Deep Sleep-OFF</a> in Configuration considerations. Refer to <a class="el" href="group__group__syspm.html#group_syspm_wakingup_from_sleep_deepsleep">Waking Up from Sleep or Deep Sleep</a> in Configuration considerations.</li>
<li><b>Hibernate</b> - Is the lowest power mode that is entered from firmware. Refer to <a class="el" href="group__group__syspm.html#group_syspm_switching_into_hibernate">Switching System to Hibernate</a> in Configuration considerations. On wakeup the CPU(s) and all peripherals go through a full reset. The I/O's state is frozen so that the output driver state is held in system Hibernate. Note that in this mode, the CPU(s) and all peripherals lose their states, so the system and firmware reboot on a wakeup event. Backup memory (if present) can be used to store limited system state for use on the next reboot. Refer to <a class="el" href="group__group__syspm.html#group_syspm_wakingup_from_hibernate">Waking Up from Hibernate</a> in Configuration considerations.</li>
</ul>
<dl class="section warning"><dt>Warning</dt><dd>* Above is list of all the System Power modes in general, a device support subset of the above System Power modes.Please refer to TRM for more information.</dd></dl>
<h3><a class="anchor" id="group_syspm_switching_into_lp"></a>
Switching the System into Low Power</h3>
<p>To set system LP mode you need to set LP voltage for the active core regulator:</p><ul>
<li>If active core regulator is the LDO, call: <div class="fragment"><div class="line"><a class="code" href="group__group__syspm__functions__ldo.html#gaa583169f7b72095e98650fc30dfbcb24">Cy_SysPm_LdoSetVoltage</a>(<a class="code" href="group__group__syspm__data__enumerates.html#ggaef8ba4a0ee827abcaaf62f950e69496eaed1d9d509568249e009c801328e8d7a3">CY_SYSPM_LDO_VOLTAGE_LP</a>);</div></div><!-- fragment --></li>
<li>If active core regulator is the Buck, call: <div class="fragment"><div class="line"><a class="code" href="group__group__syspm__functions__buck.html#gabcdba9193b78620e0e6481f068093376">Cy_SysPm_BuckSetVoltage1</a>(<a class="code" href="group__group__syspm__data__enumerates.html#gga3917bcfb5a7b4151ec1b0fcd95c37d5aa0b8ad38048816d6a7fd0dd3ac6e0e2aa">CY_SYSPM_BUCK_OUT1_VOLTAGE_LP</a>)</div></div><!-- fragment --></li>
</ul>
<p>After switching into system LP mode, the operating frequency and current consumption may now be increased up to <a class="el" href="group__group__syspm.html#group_syspm_lp_limitations">LP Limitations</a>. The wait states for flash may be changed to increase device performance by calling SysLib function Cy_SysLib_SetWaitStates(true, hfClkFreqMz), where hfClkFreqMz is the frequency of HfClk0 in MHz.</p>
<h3><a class="anchor" id="group_syspm_lp_limitations"></a>
LP Limitations</h3>
<p>When the system is in LP mode, the core regulator voltage is set to <b>1.1 V (nominal)</b> and the following limitations must be met:</p>
<ul>
<li>The maximum operating frequency for all Clk_HF paths must not exceed <b>150 MHz*</b>, and peripheral and slow clock must not exceed <b>100 MHz *</b></li>
<li>The total current consumption must be less than or equal to <b>250 mA *</b></li>
</ul>
<dl class="section warning"><dt>Warning</dt><dd>* - Numbers shown are approximate and real limit values may be different because they are device specific. You should refer to the device datasheet for exact values of maximum frequency and current in system LP mode.</dd></dl>
<h3><a class="anchor" id="group_syspm_switching_into_ulp"></a>
Switching the System into Ultra Low Power</h3>
<p>Before switching into system ULP mode, ensure that the device meets <a class="el" href="group__group__syspm.html#group_syspm_ulp_limitations">ULP Limitations</a>. Decrease the clock frequencies, and slow or disable peripherals. Also ensure that appropriate wait state values are set for the flash. Flash wait states can be set by calling SysLib function Cy_SysLib_SetWaitStates(true, hfClkFreqMz), where hfClkFreqMz is the frequency of HfClk0 in MHz.</p>
<p>After the <a class="el" href="group__group__syspm.html#group_syspm_ulp_limitations">ULP Limitations</a> are met and appropriate wait states are set, you must set ULP voltage for the active core regulator:</p><ul>
<li>If active core regulator is the LDO Core Voltage Regulator, call Cy_SysPm_LdoSetVoltage(CY_SYSPM_LDO_VOLTAGE_ULP)</li>
<li>If active core regulator is the Buck Core Voltage Regulator, then call Cy_SysPm_BuckSetVoltage1(CY_SYSPM_BUCK_OUT1_VOLTAGE_ULP)</li>
</ul>
<h3><a class="anchor" id="group_syspm_ulp_limitations"></a>
ULP Limitations</h3>
<p>When the system is in ULP mode the core regulator voltage is set to <b>0.9 V (nominal)</b> and the following limitations must be meet:</p>
<ul>
<li>The maximum operating frequency for all Clk_HF paths must not exceed <b>50 MHz *</b>, whereas the peripheral and slow clock must not exceed <b>25 MHz *</b>.</li>
<li>The total current consumption must be less than or equal to <b>20 mA*</b></li>
<li>the flash write operations are prohibited. The flash works in the Read-only operation. If Write operations are required, you must switch to the system LP mode.</li>
</ul>
<dl class="section warning"><dt>Warning</dt><dd>* - Numbers shown are approximate and real limit values may be different because they are device specific. You should refer to the device datasheet for exact values of maximum frequency and current in system ULP mode.</dd></dl>
<h3><a class="anchor" id="group_syspm_switching_into_lpactivelpsleep"></a>
Switching the System into LPACTIVE/LPSLEEP</h3>
<p>Call <a class="el" href="group__group__syspm__functions__power.html#gae5b8fe608ae9052382b242d29d34d4b9" title="Change the system from ACTIVE Profile to LPACTIVE (Low Power Active)/LPSLEEP (Low Power Sleep) Profil...">Cy_SysPm_SystemLpActiveEnter()</a> to enter LPACTIVE/LPSLEEP mode and <a class="el" href="group__group__syspm__functions__power.html#ga81d08ce12e3dd770c48e8bc23246c18f" title="Changes the system from LPACTIVE (Low Power Active)/LPSLEEP (Low Power Sleep) Profile to ACTIVE Profi...">Cy_SysPm_SystemLpActiveExit()</a> to exit.</p>
<h3><a class="anchor" id="group_syspm_switching_into_sleep"></a>
Switching CPU into Sleep</h3>
<p>For multi-CPU devices, the <a class="el" href="group__group__syspm__functions__power.html#gab09936e85606de476a0c379f9548603f" title="Sets executing CPU to Sleep mode. ">Cy_SysPm_CpuEnterSleep()</a> switches only the CPU that calls the function into the CPU Sleep power mode.</p>
<p>All pending interrupts must be cleared before the CPU is put into a Sleep mode, even if they are masked.</p>
<p>The CPU event register can be set in the past, for example, as a result of internal system calls. So an old event can cause the CPU to not enter Sleep mode upon WFE(). Therefore usually the WFE() is used in an idle loop or polling loop as it might or might not cause entering of CPU Sleep mode. If the idle loop or polling loop is not used, then it is recommended to use WFI() instruction.</p>
<h3><a class="anchor" id="group_syspm_switching_into_deepsleep"></a>
Switching the System or CPU into Deep Sleep</h3>
<p>For multi-CPU devices, the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a> function switches only the CPU that calls the function into the CPU Deep Sleep power mode. To set the whole system into Deep Sleep power mode, ensure that all CPUs call the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a> function.</p>
<dl class="section warning"><dt>Warning</dt><dd>* For CAT1B devices we need to call <a class="el" href="group__group__syspm__functions__power.html#gaaff87adb57f74191a344e996517bd74b" title="Set the deepsleep mode - deepsleep or deepsleep-ram or deepsleep-off. ">Cy_SysPm_SetDeepSleepMode()</a> function with appropriate type of deepsleep as parameter before calling <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a> function.</dd></dl>
<h3><a class="anchor" id="group_syspm_switching_into_deepsleep-ram"></a>
Switching the System or CPU into Deep Sleep-RAM</h3>
<p>For multi-CPU devices, the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a> function switches only the CPU that calls the function into the CPU DEEPSLEEP-RAM power mode. To set the whole system into Deep Sleep power mode, ensure that all CPUs call the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a> function.</p>
<dl class="section warning"><dt>Warning</dt><dd>* For CAT1B devices we need to call <a class="el" href="group__group__syspm__functions__power.html#gaaff87adb57f74191a344e996517bd74b" title="Set the deepsleep mode - deepsleep or deepsleep-ram or deepsleep-off. ">Cy_SysPm_SetDeepSleepMode()</a> function with appropriate type of deepsleep as parameter before calling <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a> function.</dd></dl>
<h3><a class="anchor" id="group_syspm_switching_into_deepsleep-off"></a>
Switching the System or CPU into Deep Sleep-OFF</h3>
<p>For multi-CPU devices, the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a> function switches only the CPU that calls the function into the CPU DEEPSLEEP-OFF power mode. To set the whole system into Deep Sleep power mode, ensure that all CPUs call the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a> function.</p>
<p>Note:- For CAT1B devices we need to call <a class="el" href="group__group__syspm__functions__power.html#gaaff87adb57f74191a344e996517bd74b" title="Set the deepsleep mode - deepsleep or deepsleep-ram or deepsleep-off. ">Cy_SysPm_SetDeepSleepMode()</a> function with appropriate type of deepsleep as parameter before calling <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a> function.</p>
<p>There are situations when the system does not switch into the Deep Sleep power mode immediately after the last CPU calls <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a>. The system will switch into Deep Sleep mode automatically a short time later, after the low power circuits are ready to switch into Deep Sleep. Refer to the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a> description for more detail.</p>
<p>All pending interrupts must be cleared before the system is put into a Deep Sleep mode, even if they are masked.</p>
<p>The CPU event register can be set in the past, for example, as a result of internal system calls. So an old event can cause the CPU to not enter Deep Sleep mode upon WFE(). Therefore usually the WFE() is used in an idle loop or polling loop as it might or might not cause entering of CPU Deep Sleep mode. If the idle loop or polling loop is not used, then it is recommended to use WFI() instruction.</p>
<p>For single-CPU devices, SysPm functions that return the status of the unsupported CPU always return CY_SYSPM_STATUS_&lt;CPU&gt;_DEEPSLEEP.</p>
<h3><a class="anchor" id="group_syspm_wakingup_from_sleep_deepsleep"></a>
Waking Up from Sleep or Deep Sleep</h3>
<p>For Arm-based devices, an interrupt is required for the CPU to wake up. For multi-CPU devices, one CPU can wake up the other CPU by sending the event instruction. Use the <a class="el" href="group__group__syspm__functions__power.html#gabd844e62e992040d43b3b692b7718c77" title="Sends the SEV (Send Event) ARM instruction to the system. ">Cy_SysPm_CpuSendWakeupEvent()</a> function.</p>
<h3><a class="anchor" id="group_syspm_switching_into_hibernate"></a>
Switching System to Hibernate</h3>
<p>If you call <a class="el" href="group__group__syspm__functions__power.html#gae97647a28c370674ba57d451d21d1c51" title="Sets the device into system Hibernate mode. ">Cy_SysPm_SystemEnterHibernate()</a> from either CPU, the system will be switched into the Hibernate power mode directly, because there is no handshake between CPUs.</p>
<h3><a class="anchor" id="group_syspm_wakingup_from_hibernate"></a>
Waking Up from Hibernate</h3>
<p>The system can wake up from Hibernate mode by configuring the following wakeup sources:</p><ul>
<li>Wakeup pin</li>
<li>LP Comparator</li>
<li>RTC alarm</li>
<li>WDT interrupt</li>
</ul>
<p>Wakeup is supported from device specific pin(s) with programmable polarity. Additionally, unregulated peripherals can wake the system under some conditions. For example, a low power comparator can wake the system by comparing two external voltages, but does not support comparison to an internally-generated voltage. The backup power domain remains functional, and if present it can schedule an alarm to wake the system from Hibernate using the RTC. Alternatively, the Watchdog Timer (WDT) can be configured to wake-up the system by WDT interrupt. Refer to <a class="el" href="group__group__syspm__functions__power.html#ga2540970e6c27efa25752efc43da0d622">Cy_SysPm_SetHibernateWakeupSource()</a> for more detail.</p>
<h2><a class="anchor" id="group_syspm_system_reg_curr_mode"></a>
System Regulator Current Mode</h2>
<p>In addition to system ULP and LP modes, the five different resource power settings can be configured to reduce current consumption:</p><ol type="1">
<li><b>Linear regulator low power mode</b>. Can be used only if core current is below the LDO regulator LP threshold.</li>
<li><b>POR/BOD circuit low power mode</b>. Requires compatible power supply stability due to stability increase response time.</li>
<li><b>Bandgap reference circuits low power mode</b> (turns on Deep Sleep Bandgap). Requires design to accept reduced Vref accuracy. Active ref can be turned off after this feature is enabled.</li>
<li><b>Reference buffer circuit low power mode</b>. Requires design to accept reduced Vref accuracy.</li>
<li><b>Current reference circuit low power mode</b>. Require design to accept reduced Iref accuracy.</li>
</ol>
<p>These five sub features can modify both system LP or ULP modes as they are independent from LP/ULP settings. When all five sub features are set to their low power modes, the system operates in regulator minimum current mode. In regulator minimum current mode, the system current consumption is limited to a device-specific value. Refer to the device datasheet for the exact current consumption value in regulator minimum current mode.</p>
<p>When all five sub features are set to their normal mode, the system operates in regulator normal current mode. When regulator normal current mode is set, the system may operate at device maximum current.</p>
<h2><a class="anchor" id="group_syspm_system_set_min_reg_curr_mode"></a>
Setting Minimum System Regulator Current Mode</h2>
<p>Before setting the regulator minimum current mode ensure that current limits are be met. After current limits are met, call the <a class="el" href="group__group__syspm__functions__power.html#ga3bde7056544d0ada3da80a0f58fefab9" title="Sets the system into minimum core regulator current mode. ">Cy_SysPm_SystemSetMinRegulatorCurrent()</a> function.</p>
<h2><a class="anchor" id="group_syspm_system_set_normal_reg_curr_mode"></a>
Setting Normal System Regulator Current Mode</h2>
<p>To set regulator normal current mode, call the <a class="el" href="group__group__syspm__functions__power.html#ga54112d6ea4d40ad241923ee7068f5363" title="Sets the system to normal regulator current mode. ">Cy_SysPm_SystemSetNormalRegulatorCurrent()</a> function. After the function call, the current limits can be increased to a maximum current, depending on what system power mode is set: LP or ULP.</p>
<h2><a class="anchor" id="group_syspm_managing_pmic"></a>
Managing PMIC</h2>
<p>The SysPm driver also provides an API to configure the internal power management integrated circuit (PMIC) controller for an external PMIC that supplies Vddd. Use the API to enable the internal PMIC controller output that is routed to pmic_wakeup_out pin, and configure the polarity of the PMIC controller input (pmic_wakeup_in) that is used to wake up the PMIC.</p>
<p>The PMIC controller is automatically enabled when:</p><ul>
<li>The PMIC is locked by a call to <a class="el" href="group__group__syspm__functions__pmic.html#ga7b4ea274cd13069239a54244b343f625" title="Locks the PMIC control controller register so that no changes can be made. ">Cy_SysPm_PmicLock()</a></li>
<li>The configured polarity of the PMIC input and the polarity driven to pmic_wakeup_in pin matches.</li>
</ul>
<p>Because a call to <a class="el" href="group__group__syspm__functions__pmic.html#ga7b4ea274cd13069239a54244b343f625" title="Locks the PMIC control controller register so that no changes can be made. ">Cy_SysPm_PmicLock()</a> automatically enables the PMIC controller, the PMIC can remain disabled only when it is unlocked. See <a class="el" href="group__group__syspm__functions__pmic.html#gacc9a1ba737ee1907cdb658c24ed90a6c" title="Unlocks the PMIC control register so that changes can be made. ">Cy_SysPm_PmicUnlock()</a> for more detail.</p>
<p>Use <a class="el" href="group__group__syspm__functions__pmic.html#ga57dbfc7c1713ba6cea79bacddbd8d187" title="Returns the PMIC controller lock status. ">Cy_SysPm_PmicIsLocked()</a> to read the current PMIC lock status.</p>
<p>To enable the PMIC, use these functions in this order: </p><div class="fragment"><div class="line"><a class="code" href="group__group__syspm__functions__pmic.html#gacc9a1ba737ee1907cdb658c24ed90a6c">Cy_SysPm_PmicUnlock</a>();</div><div class="line"><a class="code" href="group__group__syspm__functions__pmic.html#ga0a65826b5bbb61c785e3016dc4eff39b">Cy_SysPm_PmicEnable</a>();</div><div class="line"><a class="code" href="group__group__syspm__functions__pmic.html#ga7b4ea274cd13069239a54244b343f625">Cy_SysPm_PmicLock</a>();</div></div><!-- fragment --><p>To disable the PMIC controller, unlock the PMIC. Then call <a class="el" href="group__group__syspm__functions__pmic.html#ga9cd99bbe881163eb76791e8474e4bbcb" title="Disable the external PMIC controller that supplies Vddd (if present). ">Cy_SysPm_PmicDisable()</a> with the inverted value of the current active state of the pmic_wakeup_in pin. For example, assume the current state of the pmic_wakeup_in pin is active low. To disable the PMIC controller, call these functions in this order: </p><div class="fragment"><div class="line"><a class="code" href="group__group__syspm__functions__pmic.html#gacc9a1ba737ee1907cdb658c24ed90a6c">Cy_SysPm_PmicUnlock</a>();</div><div class="line"><a class="code" href="group__group__syspm__functions__pmic.html#ga9cd99bbe881163eb76791e8474e4bbcb">Cy_SysPm_PmicDisable</a>(<a class="code" href="group__group__syspm__data__enumerates.html#ggac8cae3aa3e15bb4ce9e737fdaf5027fcad632c1c3db90572755db24b8cf14b4ff">CY_SYSPM_PMIC_POLARITY_HIGH</a>);</div></div><!-- fragment --><p> Note that you do not call <a class="el" href="group__group__syspm__functions__pmic.html#ga7b4ea274cd13069239a54244b343f625" title="Locks the PMIC control controller register so that no changes can be made. ">Cy_SysPm_PmicLock()</a>, because that automatically enables the PMIC.</p>
<p>While disabled, the PMIC controller is automatically enabled when the pmic_wakeup_in pin state is changed into a high state.</p>
<p>To disable the PMIC controller output, call these functions in this order: <a class="el" href="group__group__syspm__functions__pmic.html#gacc9a1ba737ee1907cdb658c24ed90a6c" title="Unlocks the PMIC control register so that changes can be made. ">Cy_SysPm_PmicUnlock()</a>; <a class="el" href="group__group__syspm__functions__pmic.html#ga3110205ee0e5d422d3ec534953b6c0ed" title="Disables the PMIC controller output pin. ">Cy_SysPm_PmicDisableOutput()</a>;</p>
<p>Do not call <a class="el" href="group__group__syspm__functions__pmic.html#ga7b4ea274cd13069239a54244b343f625" title="Locks the PMIC control controller register so that no changes can be made. ">Cy_SysPm_PmicLock()</a> (which automatically enables the PMIC controller output).</p>
<p>When disabled, the PMIC controller output is enabled when the PMIC is locked, or by calling <a class="el" href="group__group__syspm__functions__pmic.html#ga2c6eadbd1e5f2ca43e959a1153aa8e3a" title="Enables the PMIC controller output pin. ">Cy_SysPm_PmicEnableOutput()</a>.</p>
<h2><a class="anchor" id="group_syspm_managing_backup_domain"></a>
Managing the Backup Domain</h2>
<p>The SysPm driver provide functions to:</p>
<ul>
<li>Configure Supercapacitor charging</li>
<li>Select power supply source (Vbackup or Vddd) for Vddbackup</li>
<li>Measure Vddbackup using the ADC</li>
</ul>
<p>Refer to the <a class="el" href="group__group__syspm__functions__backup.html">Backup Domain</a> functions for more detail.</p>
<h2><a class="anchor" id="group_syspm_cb"></a>
SysPm Callbacks</h2>
<p>The SysPm driver handles low power callbacks declared in the application.</p>
<p>If there are no callbacks registered, the device executes the power mode transition. However, frequently your application firmware must make modifications for low power mode. For example, you may need to disable a peripheral, or ensure that a message is not being transmitted or received.</p>
<p>To enable this, the SysPm driver implements a callback mechanism. When a lower power mode transition is about to take place (either entering or exiting <a class="el" href="group__group__syspm.html#group_syspm_system_power_modes">System Power Modes</a>), the registered callbacks for that transition are called.</p>
<p>The SysPm driver organizes all the callbacks into a linked list. While entering a low power mode, SysPm goes through that linked list from first to last, executing the callbacks one after another. While exiting low power mode, SysPm goes through that linked list again, but in the opposite direction from last to first. This ordering supports prioritization of callbacks relative to the transition event.</p>
<p>For example, the picture below shows three callback structures organized into a linked list: myDeepSleep1, myDeepSleep2, myDeepSleep3 (represented with the <a class="el" href="structcy__stc__syspm__callback__t.html">cy_stc_syspm_callback_t</a> configuration structure). Each structure contains, among other fields, the address of the callback function. The code snippets below set this up so that myDeepSleep1 is called first when entering the low power mode. This also means that myDeepSleep1 will be the last one to execute when exiting the low power mode.</p>
<p>The callback structures after registration: </p><div class="image">
<img src="syspm_register_eq.png" alt="syspm_register_eq.png"/>
</div>
<p>Your application must register each callback, so that SysPm can execute it. Upon registration, the linked list is built by the SysPm driver. Notice the &amp;myDeepSleep1 address in the myDeepSleep1 <a class="el" href="structcy__stc__syspm__callback__t.html">cy_stc_syspm_callback_t</a> structure. This is filled in by the SysPm driver, when you register myDeepSleep1. The <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a> element defines the order of their execution by the SysPm driver. Call <a class="el" href="group__group__syspm__functions__callback.html#ga0d58b00c8dc764a6371590f70e2f73c7">Cy_SysPm_RegisterCallback()</a> to register each callback function.</p>
<p>A callback function is typically associated with a particular driver that handles the peripheral. So the callback mechanism enables a peripheral to prepare for a low power mode (for instance, shutting down the analog part); or to perform tasks while exiting a low power mode (like enabling the analog part again).</p>
<p>With the callback mechanism you can prevent switching into a low power mode if a peripheral is not ready. For example, driver X is in the process of receiving a message. In the callback function implementation simply return CY_SYSPM_FAIL in a response to CY_SYSPM_CHECK_READY.</p>
<p>If success is returned while executing a callback, the SysPm driver calls the next callback and so on to the end of the list. If at some point a callback returns CY_SYSPM_FAIL in response to the CY_SYSPM_CHECK_READY step, all the callbacks that have already executed are executed in reverse order, with the CY_SYSPM_CHECK_FAIL mode parameter. This allows each callback to know that entering the low power mode has failed. The callback can then undo whatever it did to prepare for low power mode, if required. For example, if the driver X callback shut down the analog part, it can re-enable the analog part.</p>
<p>Let's switch to an example explaining the implementation, setup, and registration of three callbacks (myDeepSleep1, myDeepSleep2, myDeepSleep2) in the application. The <a class="el" href="group__group__syspm.html#group_syspm_cb_config_consideration">Callback Configuration Considerations</a> are provided after the <a class="el" href="group__group__syspm.html#group_syspm_cb_example">SysPm Callbacks Example</a>.</p>
<h2><a class="anchor" id="group_syspm_cb_example"></a>
SysPm Callbacks Example</h2>
<p>The following code snippets demonstrate how use the SysPm callbacks mechanism. We will build the prototype for an application that registers three callback functions:</p><ol type="1">
<li>myDeepSleep1 - Handles CPU Deep Sleep.</li>
<li>myDeepSleep2 - Handles CPU Deep Sleep and is associated with peripheral HW1_address (see <a href="..\..\pdl_user_guide.pdf">PDL Design</a> section to learn about the base hardware address).</li>
<li>myDeepSleep3 - Handles entering and exiting system Deep Sleep and is associated with peripheral HW2_address.</li>
</ol>
<p>We set things up so that the myDeepSleep1 and myDeepSleep2 callbacks do nothing while entering the low power mode (skip on CY_SYSPM_SKIP_BEFORE_TRANSITION - see <a class="el" href="group__group__syspm.html#group_syspm_cb_function_implementation">Callback Function Implementation</a> in <a class="el" href="group__group__syspm.html#group_syspm_cb_config_consideration">Callback Configuration Considerations</a>). Skipping the actions while entering low power might be useful if you need to save time while switching low power modes. This is because the callback function with a skipped mode is not even called avoiding the call and return overhead.</p>
<p>Let's first declare the callback functions. Each gets the pointer to the <a class="el" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> structure as the argument.</p>
<div class="fragment"><div class="line"><span class="comment">/* Scenario: There is a need to have three callbacks for the CPU Deep Sleep </span></div><div class="line"><span class="comment">*  mode. DeepSleepFunc1 and DeepSleepFunc2 callback function skip </span></div><div class="line"><span class="comment">*  CY_SYSPM_BEFORE_TRANSITION mode.</span></div><div class="line"><span class="comment">*  DeepSleepFunc3 executes all four modes. </span></div><div class="line"><span class="comment">*  Note that for the multi-CPU devices the another CPU must be in CPU </span></div><div class="line"><span class="comment">*  Deep Sleep power mode. </span></div><div class="line"><span class="comment">*/</span></div><div class="line"></div><div class="line"><span class="comment">/******************************************************************************</span></div><div class="line"><span class="comment">*  Callback prototypes</span></div><div class="line"><span class="comment">******************************************************************************/</span></div><div class="line"><a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> DeepSleepFunc1(<a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> *callbackParams, <a class="code" href="group__group__syspm__data__enumerates.html#gae06cd8869fe61d709ad6145ca9f3cd63">cy_en_syspm_callback_mode_t</a> <a class="code" href="group__group__ipc__bt__data__structures.html#ga37e90f5e3bd99fac2021fb3a326607d4">mode</a>);</div><div class="line"><a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> DeepSleepFunc2(<a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> *callbackParams, <a class="code" href="group__group__syspm__data__enumerates.html#gae06cd8869fe61d709ad6145ca9f3cd63">cy_en_syspm_callback_mode_t</a> <a class="code" href="group__group__ipc__bt__data__structures.html#ga37e90f5e3bd99fac2021fb3a326607d4">mode</a>);</div><div class="line"><a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> DeepSleepFunc3(<a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> *callbackParams, <a class="code" href="group__group__syspm__data__enumerates.html#gae06cd8869fe61d709ad6145ca9f3cd63">cy_en_syspm_callback_mode_t</a> <a class="code" href="group__group__ipc__bt__data__structures.html#ga37e90f5e3bd99fac2021fb3a326607d4">mode</a>);</div></div><!-- fragment --><p> Now we setup the <a class="el" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> structures that we will pass to the callback functions. Note that for the myDeepSleep2 and myDeepSleep3 callbacks we also pass pointers to the peripherals related to that callback (see <a href="..\..\pdl_user_guide.pdf">PDL Design</a> section to learn about base hardware addresses). The configuration considerations related to this structure are described in <a class="el" href="group__group__syspm.html#group_syspm_cb_parameters">Callback Function Parameters</a> in <a class="el" href="group__group__syspm.html#group_syspm_cb_config_consideration">Callback Configuration Considerations</a>.</p>
<div class="fragment"><div class="line"><span class="comment">/******************************************************************************</span></div><div class="line"><span class="comment">*  Parameter structures for callback functions</span></div><div class="line"><span class="comment">******************************************************************************/</span></div><div class="line"><a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> deepSleepParam1 = </div><div class="line">{</div><div class="line">    NULL,</div><div class="line">    NULL</div><div class="line">};</div><div class="line"></div><div class="line"><a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> deepSleepParam2 = </div><div class="line">{</div><div class="line">    &amp;HW1_address,</div><div class="line">    &amp;context</div><div class="line">};</div><div class="line"></div><div class="line"><a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> deepSleepParam3 = </div><div class="line">{</div><div class="line">    &amp;HW2_address,</div><div class="line">    NULL</div><div class="line">};</div></div><!-- fragment --><p> Now we setup the actual callback configuration structures. Each of these contains, among the other fields, the address of the <a class="el" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> we just set up. We will use the callback configuration structures later in the code to register the callbacks in the SysPm driver. Again, we set things up so that the myDeepSleep1 and myDeepSleep2 callbacks do nothing while entering the low power mode (skip on CY_SYSPM_SKIP_BEFORE_TRANSITION) - see <a class="el" href="group__group__syspm.html#group_syspm_cb_function_implementation">Callback Function Implementation</a> in <a class="el" href="group__group__syspm.html#group_syspm_cb_config_consideration">Callback Configuration Considerations</a>.</p>
<div class="fragment"><div class="line"><span class="comment">/******************************************************************************</span></div><div class="line"><span class="comment">*  Callbacks structures</span></div><div class="line"><span class="comment">******************************************************************************/</span></div><div class="line"><a class="code" href="structcy__stc__syspm__callback__t.html">cy_stc_syspm_callback_t</a> myDeepSleep1 = </div><div class="line">{</div><div class="line">    &amp;DeepSleepFunc1, </div><div class="line">    <a class="code" href="group__group__syspm__data__enumerates.html#gga8c2960c0164ead1cfa86e7d6846b6ff0abc51d74deff0ceea4304b01b2d57bd9d">CY_SYSPM_DEEPSLEEP</a>,</div><div class="line">    <a class="code" href="group__group__syspm__skip__callback__modes.html#ga77a2dc7326bb7e6cf893dc7b258b3a42">CY_SYSPM_SKIP_BEFORE_TRANSITION</a>,</div><div class="line">    &amp;deepSleepParam1,</div><div class="line">    NULL,</div><div class="line">    NULL,</div><div class="line">    0</div><div class="line">};</div><div class="line"></div><div class="line"><a class="code" href="structcy__stc__syspm__callback__t.html">cy_stc_syspm_callback_t</a> myDeepSleep2 = </div><div class="line">{</div><div class="line">    &amp;DeepSleepFunc2, </div><div class="line">    <a class="code" href="group__group__syspm__data__enumerates.html#gga8c2960c0164ead1cfa86e7d6846b6ff0abc51d74deff0ceea4304b01b2d57bd9d">CY_SYSPM_DEEPSLEEP</a>,</div><div class="line">    <a class="code" href="group__group__syspm__skip__callback__modes.html#ga77a2dc7326bb7e6cf893dc7b258b3a42">CY_SYSPM_SKIP_BEFORE_TRANSITION</a>,</div><div class="line">    &amp;deepSleepParam2,</div><div class="line">    NULL,</div><div class="line">    NULL,</div><div class="line">    0</div><div class="line">};</div><div class="line"></div><div class="line"><a class="code" href="structcy__stc__syspm__callback__t.html">cy_stc_syspm_callback_t</a> myDeepSleep3 = </div><div class="line">{</div><div class="line">    &amp;DeepSleepFunc3, </div><div class="line">    <a class="code" href="group__group__syspm__data__enumerates.html#gga8c2960c0164ead1cfa86e7d6846b6ff0abc51d74deff0ceea4304b01b2d57bd9d">CY_SYSPM_DEEPSLEEP</a>,</div><div class="line">    0U,</div><div class="line">    &amp;deepSleepParam3,</div><div class="line">    NULL,</div><div class="line">    NULL,</div><div class="line">    0</div><div class="line">};</div><div class="line">    </div></div><!-- fragment --><p> Note that in each case the last two fields are NULL. These are fields used by the SysPm driver to set up the linked list of callback functions.</p>
<p>The callback structures are now defined and allocated in the user's memory space: </p><div class="image">
<img src="syspm_before_registration.png" alt="syspm_before_registration.png"/>
</div>
<p>Now we implement the callback functions. See <a class="el" href="group__group__syspm.html#group_syspm_cb_function_implementation">Callback Function Implementation</a> in <a class="el" href="group__group__syspm.html#group_syspm_cb_config_consideration">Callback Configuration Considerations</a> for the instructions on how the callback functions should be implemented.</p>
<div class="fragment"><div class="line"><span class="comment">/******************************************************************************</span></div><div class="line"><span class="comment">*  DeepSleepFunc1 implementation</span></div><div class="line"><span class="comment">******************************************************************************/</span></div><div class="line"><a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> DeepSleepFunc1(<a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> *callbackParams, <a class="code" href="group__group__syspm__data__enumerates.html#gae06cd8869fe61d709ad6145ca9f3cd63">cy_en_syspm_callback_mode_t</a> <a class="code" href="group__group__ipc__bt__data__structures.html#ga37e90f5e3bd99fac2021fb3a326607d4">mode</a>)</div><div class="line">{</div><div class="line">    <a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caa5e406c6cb40fdf6663df0208737d4f11">CY_SYSPM_FAIL</a>;</div><div class="line">    </div><div class="line">    </div><div class="line">    <span class="keywordflow">if</span> (callbackParams != NULL)</div><div class="line">    {</div><div class="line">        <span class="comment">/* In this use case we do not need to use HW address or context</span></div><div class="line"><span class="comment">        * So, need to add code to some switch case with callbackParams to avoid </span></div><div class="line"><span class="comment">        * compiler warnings</span></div><div class="line"><span class="comment">        */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="keywordflow">switch</span>(mode)</div><div class="line">    {</div><div class="line">        <span class="comment">/* In this case ensure that firmware/hardware is ready for CPU</span></div><div class="line"><span class="comment">        *  Deep Sleep mode */</span></div><div class="line">        <span class="keywordflow">case</span> <a class="code" href="group__group__syspm__data__enumerates.html#ggae06cd8869fe61d709ad6145ca9f3cd63ab7ec706d80b347433d0063f2a8115784">CY_SYSPM_CHECK_READY</a>:</div><div class="line">            <span class="keywordflow">if</span>(<span class="keyword">true</span><span class="comment">/* system is ready */</span>)</div><div class="line">            {</div><div class="line">                <span class="comment">/* Process the &quot;check ready&quot; condition */</span></div><div class="line">                retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caaf00d22f1ee891a8a56f8bbf58132e775">CY_SYSPM_SUCCESS</a>;</div><div class="line">            }</div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">        </div><div class="line">        <span class="comment">/* One of the registered callback that was executed after this callback </span></div><div class="line"><span class="comment">        *  returned CY_SYSPM_FAIL, need to revert changes (if any) performed in </span></div><div class="line"><span class="comment">        *  the CY_SYSPM_CHECK_READY case.</span></div><div class="line"><span class="comment">        */</span></div><div class="line">        <span class="keywordflow">case</span> <a class="code" href="group__group__syspm__data__enumerates.html#ggae06cd8869fe61d709ad6145ca9f3cd63a96acf2d0ae5537798228d5fba0fecd17">CY_SYSPM_CHECK_FAIL</a>:</div><div class="line">            {</div><div class="line">                <span class="comment">/* Revert changes done in the CY_SYSPM_CHECK_READY case */</span></div><div class="line">                retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caaf00d22f1ee891a8a56f8bbf58132e775">CY_SYSPM_SUCCESS</a>;</div><div class="line">            }</div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">            </div><div class="line">        <span class="comment">/* This case will be skipped during callbacks execution */</span></div><div class="line">        <span class="keywordflow">case</span> <a class="code" href="group__group__syspm__data__enumerates.html#ggae06cd8869fe61d709ad6145ca9f3cd63a7d302375276b3b5f250a8208c999b558">CY_SYSPM_BEFORE_TRANSITION</a>:</div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">            </div><div class="line">        <span class="comment">/* This case is executed after wakeup from system Deep Sleep */</span></div><div class="line">        <span class="keywordflow">case</span> <a class="code" href="group__group__syspm__data__enumerates.html#ggae06cd8869fe61d709ad6145ca9f3cd63aafd1db1f7f86ac7bbd18d59b78af5693">CY_SYSPM_AFTER_TRANSITION</a>:</div><div class="line">            {</div><div class="line">                <span class="comment">/* Perform actions, if required, after wakeup from the  </span></div><div class="line"><span class="comment">                *  system Deep Sleep mode */</span></div><div class="line">                retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caaf00d22f1ee891a8a56f8bbf58132e775">CY_SYSPM_SUCCESS</a>;</div><div class="line">            }</div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">        </div><div class="line">        <span class="keywordflow">default</span>:</div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="keywordflow">return</span> (retVal);</div><div class="line">}</div><div class="line"></div><div class="line"></div><div class="line"><span class="comment">/******************************************************************************</span></div><div class="line"><span class="comment">*  DeepSleepFunc2 implementation</span></div><div class="line"><span class="comment">******************************************************************************/</span></div><div class="line"><a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> DeepSleepFunc2(<a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> *callbackParams, <a class="code" href="group__group__syspm__data__enumerates.html#gae06cd8869fe61d709ad6145ca9f3cd63">cy_en_syspm_callback_mode_t</a> mode)</div><div class="line">{</div><div class="line">    <a class="code" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *hwBase = (<a class="code" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *) callbackParams-&gt;<a class="code" href="structcy__stc__syspm__callback__params__t.html#a56076e99358e2b7c99681312108b09af">base</a>;</div><div class="line">    <a class="code" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> *context = (<a class="code" href="structcy__stc__scb__spi__context__t.html">cy_stc_scb_spi_context_t</a> *) callbackParams-&gt;<a class="code" href="structcy__stc__syspm__callback__params__t.html#abac771f244791efe23d4964a40bbf8c8">context</a>;</div><div class="line">    </div><div class="line">    <a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caa5e406c6cb40fdf6663df0208737d4f11">CY_SYSPM_FAIL</a>;</div><div class="line"></div><div class="line">    <span class="keywordflow">switch</span>(mode)</div><div class="line">    {</div><div class="line">        <span class="comment">/* Check is the HW1 ready to enter CPU Deep Sleep */</span></div><div class="line">        <span class="keywordflow">case</span> <a class="code" href="group__group__syspm__data__enumerates.html#ggae06cd8869fe61d709ad6145ca9f3cd63ab7ec706d80b347433d0063f2a8115784">CY_SYSPM_CHECK_READY</a>:</div><div class="line">        {</div><div class="line">            <span class="comment">/* ... */</span></div><div class="line">            <span class="keywordflow">if</span> (0UL == (<a class="code" href="group__group__scb__spi__macros__xfer__status.html#gab024f7d6ed7cbaa36c80c904a6179de7">CY_SCB_SPI_TRANSFER_ACTIVE</a> &amp; <a class="code" href="group__group__scb__spi__high__level__functions.html#ga95069817e25be749ae989e5d7131f8d0">Cy_SCB_SPI_GetTransferStatus</a>(hwBase, context)))</div><div class="line">            {</div><div class="line">                <span class="comment">/* There are no active actions so we can enter CPU Deep Sleep */</span></div><div class="line">                retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caaf00d22f1ee891a8a56f8bbf58132e775">CY_SYSPM_SUCCESS</a>;</div><div class="line">            }</div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">        }</div><div class="line"></div><div class="line">        <span class="keywordflow">default</span>:</div><div class="line">            retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caa5e406c6cb40fdf6663df0208737d4f11">CY_SYSPM_FAIL</a>;</div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="keywordflow">return</span> (retVal);</div><div class="line">}</div><div class="line"></div><div class="line">    </div><div class="line"><span class="comment">/******************************************************************************</span></div><div class="line"><span class="comment">*  DeepSleepFunc3 implementation</span></div><div class="line"><span class="comment">******************************************************************************/</span></div><div class="line"><a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> DeepSleepFunc3(<a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> *callbackParams, <a class="code" href="group__group__syspm__data__enumerates.html#gae06cd8869fe61d709ad6145ca9f3cd63">cy_en_syspm_callback_mode_t</a> mode)</div><div class="line">{</div><div class="line">    <a class="code" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *hwBase = (<a class="code" href="struct_cy_s_c_b___type.html">CySCB_Type</a> *) callbackParams-&gt;<a class="code" href="structcy__stc__syspm__callback__params__t.html#a56076e99358e2b7c99681312108b09af">base</a>;</div><div class="line"></div><div class="line">    <a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caa5e406c6cb40fdf6663df0208737d4f11">CY_SYSPM_FAIL</a>;</div><div class="line"></div><div class="line">    <span class="keywordflow">switch</span>(mode)</div><div class="line">    {</div><div class="line">        <span class="comment">/* Check is the HW2 ready to enter into CPU Deep Sleep */</span></div><div class="line">        <span class="keywordflow">case</span> <a class="code" href="group__group__syspm__data__enumerates.html#ggae06cd8869fe61d709ad6145ca9f3cd63ab7ec706d80b347433d0063f2a8115784">CY_SYSPM_CHECK_READY</a>:</div><div class="line">        {</div><div class="line">            <span class="keywordflow">if</span> (!<a class="code" href="group__group__scb__spi__general__functions.html#ga4241f6166816159f7365220834a5e0d0">Cy_SCB_SPI_IsBusBusy</a>(hwBase))</div><div class="line">            {</div><div class="line">                <span class="comment">/* Process the &quot;check ready&quot; condition */</span></div><div class="line">                retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caaf00d22f1ee891a8a56f8bbf58132e775">CY_SYSPM_SUCCESS</a>;</div><div class="line">            }</div><div class="line">        </div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">        }</div><div class="line"></div><div class="line">        <span class="keywordflow">case</span> <a class="code" href="group__group__syspm__data__enumerates.html#ggae06cd8869fe61d709ad6145ca9f3cd63a7d302375276b3b5f250a8208c999b558">CY_SYSPM_BEFORE_TRANSITION</a>:</div><div class="line">        {</div><div class="line">            <span class="comment">/* Switch - Turn off SCB SPI */</span></div><div class="line">            retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caaf00d22f1ee891a8a56f8bbf58132e775">CY_SYSPM_SUCCESS</a>;</div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">        }</div><div class="line">        </div><div class="line">        </div><div class="line">        <span class="keywordflow">case</span> <a class="code" href="group__group__syspm__data__enumerates.html#ggae06cd8869fe61d709ad6145ca9f3cd63aafd1db1f7f86ac7bbd18d59b78af5693">CY_SYSPM_AFTER_TRANSITION</a>:</div><div class="line">        {</div><div class="line">            <span class="comment">/* Switch - Turn on SCB SPI */</span></div><div class="line">            retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caaf00d22f1ee891a8a56f8bbf58132e775">CY_SYSPM_SUCCESS</a>;</div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">        }</div><div class="line"></div><div class="line">        <span class="keywordflow">case</span> <a class="code" href="group__group__syspm__data__enumerates.html#ggae06cd8869fe61d709ad6145ca9f3cd63a96acf2d0ae5537798228d5fba0fecd17">CY_SYSPM_CHECK_FAIL</a>:</div><div class="line">        {</div><div class="line">            <span class="comment">/* Revert changes made in CY_SYSPM_CHECK_READY switch case (if any) */</span></div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">        }</div><div class="line"></div><div class="line">        <span class="keywordflow">default</span>:</div><div class="line">            <span class="keywordflow">break</span>;</div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="keywordflow">return</span> (retVal);</div><div class="line">}</div></div><!-- fragment --><p> Finally, we register the callbacks so that the SysPm driver knows about them. The order in which the callbacks will be called depends upon the order in which the callbacks are registered. If there are no callbacks registered, the device just executes the power mode transition.</p>
<p>Callbacks that reconfigure global resources, such as clock frequencies, should be registered last. They then modify global resources as the final step before entering the low power mode, and restore those resources first, as the system returns from low power mode.</p>
<div class="fragment"><div class="line">    <span class="comment">/* Register myDeepSleep1 */</span></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__syspm__functions__callback.html#ga0d58b00c8dc764a6371590f70e2f73c7">Cy_SysPm_RegisterCallback</a>(&amp;myDeepSleep1))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="comment">/* Register myDeepSleep2 */</span></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__syspm__functions__callback.html#ga0d58b00c8dc764a6371590f70e2f73c7">Cy_SysPm_RegisterCallback</a>(&amp;myDeepSleep2))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="comment">/* Register myDeepSleep3 */</span></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__syspm__functions__callback.html#ga0d58b00c8dc764a6371590f70e2f73c7">Cy_SysPm_RegisterCallback</a>(&amp;myDeepSleep3))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div></div><!-- fragment --><p> We are done configuring three callbacks. Now the SysPm driver will execute the callbacks appropriately whenever there is a call to a power mode transition function: <a class="el" href="group__group__syspm__functions__power.html#gab09936e85606de476a0c379f9548603f">Cy_SysPm_CpuEnterSleep()</a>, <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a>, <a class="el" href="group__group__syspm__functions__power.html#gaca7c8f1ab6d555530a68978269198836">Cy_SysPm_SystemEnterUlp()</a>, <a class="el" href="group__group__syspm__functions__power.html#ga72531fcca015df727a163b510639a334">Cy_SysPm_SystemEnterLp()</a>, and <a class="el" href="group__group__syspm__functions__power.html#gae97647a28c370674ba57d451d21d1c51">Cy_SysPm_SystemEnterHibernate()</a>. </p><dl class="section note"><dt>Note</dt><dd>On a wakeup from hibernate the device goes through a reset, so the callbacks with CY_SYSPM_AFTER_TRANSITION are not executed. Refer to <a class="el" href="group__group__syspm__functions__power.html#gae97647a28c370674ba57d451d21d1c51">Cy_SysPm_SystemEnterHibernate()</a> for more detail.</dd></dl>
<p>Refer to <a class="el" href="group__group__syspm.html#group_syspm_cb_unregistering">Callback Unregistering</a> in <a class="el" href="group__group__syspm.html#group_syspm_cb_config_consideration">Callback Configuration Considerations</a> to learn what to do if you need to remove the callback from the linked list. You might want to unregister the callback for debug purposes.</p>
<p>Refer to <a class="el" href="group__group__syspm.html#group_syspm_cb_flow">Callbacks Execution Flow</a> in <a class="el" href="group__group__syspm.html#group_syspm_cb_config_consideration">Callback Configuration Considerations</a> to learn about how the SysPm processes the callbacks.</p>
<h2><a class="anchor" id="group_syspm_cb_config_consideration"></a>
Callback Configuration Considerations</h2>
<h3><a class="anchor" id="group_syspm_cb_parameters"></a>
Callback Function Parameters</h3>
<p>The <b>callbackParams</b> parameter of the callback function is a <a class="el" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> structure. The second parameter (<b>mode</b>) is for internal use. In the example code we used a dummy value CY_SYSPM_CHECK_READY to eliminate compilation errors associated with the enumeration. The driver sets the <b>mode</b> field to the correct value when calling the callback functions (the mode is referred to as step in the <a class="el" href="group__group__syspm.html#group_syspm_cb_function_implementation">Callback Function Implementation</a>). The callback function reads the value and executes code based on the mode set by the SysPm driver. The <b>base</b> and <b>context</b> fields are optional and can be NULL. Some drivers require a base hardware address and context to store information about the mode transition. If your callback routine requires access to the driver registers or context, provide those values (see <a href="..\..\pdl_user_guide.pdf">PDL Design</a> section to learn about Base Hardware Address). Be aware of MISRA warnings if these parameters are NULL.</p>
<h3><a class="anchor" id="group_syspm_cb_structures"></a>
Callback Function Structure</h3>
<p>For each callback, provide a <a class="el" href="structcy__stc__syspm__callback__t.html">cy_stc_syspm_callback_t</a> structure. Some fields in this structure are maintained by the driver. Use NULL for <a class="el" href="structcy__stc__syspm__callback__t.html#ac4dd0cc8f5d4e92eefae3d10df920a56" title="The previous list item. ">cy_stc_syspm_callback_t.prevItm</a> and <a class="el" href="structcy__stc__syspm__callback__t.html#a491e913ae8b54d0a61f2ac6959abf8ab" title="The next list item. ">cy_stc_syspm_callback_t.nextItm</a>. Driver uses these fields to build a linked list of callback functions. The value of <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a> element is used to define the order how the callbacks are put into linked list, and sequentially, how the callbacks are executed. See <a class="el" href="group__group__syspm.html#group_syspm_cb_registering">Callback Registering</a> section.</p>
<dl class="section warning"><dt>Warning</dt><dd>The <a class="el" href="group__group__syspm__functions__callback.html#ga0d58b00c8dc764a6371590f70e2f73c7" title="Registers a new syspm callback. ">Cy_SysPm_RegisterCallback()</a> function stores a pointer to the <a class="el" href="structcy__stc__syspm__callback__t.html" title="Structure with syspm callback configuration elements. ">cy_stc_syspm_callback_t</a> structure. Do not modify elements of the <a class="el" href="structcy__stc__syspm__callback__t.html" title="Structure with syspm callback configuration elements. ">cy_stc_syspm_callback_t</a> structure after the callback is registered. You are responsible for ensuring that the structure remains in scope. Typically the structure is declared as a global or static variable, or as a local variable in the main() function.</dd></dl>
<h3><a class="anchor" id="group_syspm_cb_function_implementation"></a>
Callback Function Implementation</h3>
<p>Every callback function should handle four possible steps (referred to as "mode") defined in <a class="el" href="group__group__syspm__data__enumerates.html#gae06cd8869fe61d709ad6145ca9f3cd63">cy_en_syspm_callback_mode_t</a> :</p><ul>
<li>CY_SYSPM_CHECK_READY - Check if ready to enter a power mode.</li>
<li>CY_SYSPM_BEFORE_TRANSITION - The actions to be done before entering the low power mode.</li>
<li>CY_SYSPM_AFTER_TRANSITION - The actions to be done after exiting the low power mode.</li>
<li>CY_SYSPM_CHECK_FAIL - Roll back any actions performed in the callback executed previously with CY_SYSPM_CHECK_READY.</li>
</ul>
<p>A callback function can skip steps (see <a class="el" href="group__group__syspm__skip__callback__modes.html">Defines to skip the callbacks modes</a>). In our example myDeepSleep1 and myDeepSleep2 callbacks do nothing while entering the low power mode (skip on CY_SYSPM_BEFORE_TRANSITION). If there is anything preventing low power mode entry - return CY_SYSPM_FAIL in response to CY_SYSPM_CHECK_READY in your callback implementation. Note that the callback should return CY_SYSPM_FAIL only in response to CY_SYSPM_CHECK_READY. The callback function should always return CY_SYSPM_PASS for other modes: CY_SYSPM_CHECK_FAIL, CY_SYSPM_BEFORE_TRANSITION, and CY_SYSPM_AFTER_TRANSITION (see <a class="el" href="group__group__syspm.html#group_syspm_cb_flow">Callbacks Execution Flow</a>).</p>
<h3><a class="anchor" id="group_syspm_cb_flow"></a>
Callbacks Execution Flow</h3>
<p>This section explains what happens during a power transition, when callbacks are implemented and set up correctly. The following discussion assumes:</p><ul>
<li>All required callback functions are defined and implemented</li>
<li>All <a class="el" href="structcy__stc__syspm__callback__t.html" title="Structure with syspm callback configuration elements. ">cy_stc_syspm_callback_t</a> structures are filled with required values</li>
<li>All callbacks are successfully registered</li>
</ul>
<p>User calls one of the power mode transition functions: <a class="el" href="group__group__syspm__functions__power.html#gab09936e85606de476a0c379f9548603f">Cy_SysPm_CpuEnterSleep()</a>, <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a>, <a class="el" href="group__group__syspm__functions__power.html#gaca7c8f1ab6d555530a68978269198836">Cy_SysPm_SystemEnterUlp()</a>, <a class="el" href="group__group__syspm__functions__power.html#ga72531fcca015df727a163b510639a334">Cy_SysPm_SystemEnterLp()</a>, or <a class="el" href="group__group__syspm__functions__power.html#gae97647a28c370674ba57d451d21d1c51">Cy_SysPm_SystemEnterHibernate()</a>. It calls each callback with the mode set to CY_SYSPM_CHECK_READY. This triggers execution of the code for that mode inside of each user callback.</p>
<p>The intent of CY_SYSPM_CHECK_READY is to only signal if the resources is ready to transition. Ideally, no transition changes should be made at this time. In some cases a small change may be required. For example a communication resource callback may set a flag telling firmware not to start any new transition.</p>
<p>If that process is successful for all callbacks, then <a class="el" href="group__group__syspm__functions__callback.html#ga95462119281ba8dec6b313f85dd752b0">Cy_SysPm_ExecuteCallback()</a> calls each callback with the mode set to CY_SYSPM_BEFORE_TRANSITION. This triggers execution of the code for that mode inside each user callback. We then enter the low power mode after all callback are executed.</p>
<p>When exiting the low power mode, the SysPm driver executes <a class="el" href="group__group__syspm__functions__callback.html#ga95462119281ba8dec6b313f85dd752b0">Cy_SysPm_ExecuteCallback()</a> again. This time it calls each callback in reverse order, with the mode set to CY_SYSPM_AFTER_TRANSITION. This triggers execution of the code for that mode inside each user callback. The final execution of callbacks depends on the low power mode in which callbacks were called:</p><ul>
<li>For CPU Sleep or Deep Sleep power modes, the CY_SYSPM_AFTER_TRANSITION mode is called after the CPU wakes from Sleep or Deep Sleep.</li>
<li>For system Hibernate, the CY_SYSPM_AFTER_TRANSITION mode is not executed because the device reboots after the wakeup from the Hibernate.</li>
<li>For system LP and ULP modes, after the CY_SYSPM_AFTER_TRANSITION mode was called the system remains in the new power mode: LP or ULP.</li>
</ul>
<p>A callback can return CY_SYSPM_FAIL only while executing the CY_SYSPM_CHECK_READY mode. If that happens, then the remaining callbacks are not executed. Any callbacks that have already executed are called again, in reverse order, with CY_SYSPM_CHECK_FAIL. This allows the system to return to the previous state. If a callback returns a fail then any of the functions (<a class="el" href="group__group__syspm__functions__power.html#gab09936e85606de476a0c379f9548603f">Cy_SysPm_CpuEnterSleep()</a>, <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a>, <a class="el" href="group__group__syspm__functions__power.html#gaca7c8f1ab6d555530a68978269198836">Cy_SysPm_SystemEnterUlp()</a>, <a class="el" href="group__group__syspm__functions__power.html#ga72531fcca015df727a163b510639a334">Cy_SysPm_SystemEnterLp()</a>, or <a class="el" href="group__group__syspm__functions__power.html#gae97647a28c370674ba57d451d21d1c51">Cy_SysPm_SystemEnterHibernate()</a>) that attempt to switch the device into a low power mode will also return CY_SYSPM_FAIL.</p>
<p>Callbacks that reconfigure global resources, such as clock frequencies, should be registered last. They then modify global resources as the final step before entering the low power mode, and restore those resources first, as the system returns from low power mode.</p>
<h3><a class="anchor" id="group_syspm_cb_registering"></a>
Callback Registering</h3>
<p>While registration the callback is put into the linked list. The place where the callback structure is put into the linked list is based on <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a>. The callback with the lowest <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a> value will be placed at the beginning of linked list. The callback with the highest <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a> value will be placed at the end of the linked list. If there is already a callback structure in the linked list with the same <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a> value as you attend to register, then your callback will be placed right after such a callback.</p>
<p>Such a registration order defines how the callbacks are executed:</p><ul>
<li>Callbacks with the lower <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a> are executed first when entering into low power and last when exiting from low power.</li>
<li>Callbacks with the higher <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a> are executed last when entering into low power and first when exiting from low power.</li>
</ul>
<div class="fragment"><div class="line">    <span class="comment">/* Register myDeepSleep1 */</span></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__syspm__functions__callback.html#ga0d58b00c8dc764a6371590f70e2f73c7">Cy_SysPm_RegisterCallback</a>(&amp;myDeepSleep1))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="comment">/* Register myDeepSleep2 */</span></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__syspm__functions__callback.html#ga0d58b00c8dc764a6371590f70e2f73c7">Cy_SysPm_RegisterCallback</a>(&amp;myDeepSleep2))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div><div class="line">    </div><div class="line">    <span class="comment">/* Register myDeepSleep3 */</span></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__syspm__functions__callback.html#ga0d58b00c8dc764a6371590f70e2f73c7">Cy_SysPm_RegisterCallback</a>(&amp;myDeepSleep3))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handling */</span></div><div class="line">    }</div></div><!-- fragment --><p> Callbacks with equal <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a> values are registered in the same order as they are registered: </p><div class="image">
<img src="syspm_register_eq.png" alt="syspm_register_eq.png"/>
</div>
<p>Callbacks with a different <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a> value will be stored based on the <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a> value, with no matter when they when registered:</p>
<div class="image">
<img src="syspm_register_dif.png" alt="syspm_register_dif.png"/>
</div>
<p>This can be useful to ensure that system resources (clock dividers, etc) are changed right before entering low power mode and immediately after exiting from low power.</p>
<h3><a class="anchor" id="group_syspm_cb_unregistering"></a>
Callback Unregistering</h3>
<p>Unregistering the callback might be useful when you need to dynamically manage the callbacks.</p>
<div class="fragment"><div class="line">    <span class="comment">/* Scenario: There is a need to unregister a previously registered callback */</span></div><div class="line">    <span class="keywordflow">if</span> (<span class="keyword">true</span> != <a class="code" href="group__group__syspm__functions__callback.html#gab7b9b923fceff2f37a6b8288253b0e82">Cy_SysPm_UnregisterCallback</a>(&amp;myDeepSleep2))</div><div class="line">    {</div><div class="line">        <span class="comment">/* Insert error handler */</span></div><div class="line">    }</div></div><!-- fragment --><p>The callback structures after myDeepSleep2 callback is unregistered: </p><div class="image">
<img src="syspm_unregistration.png" alt="syspm_unregistration.png"/>
</div>
<h1><a class="anchor" id="group_syspm_definitions"></a>
Definitions</h1>
<table class="doxtable">
<tr>
<th>Term </th><th><p class="starttd">Definition </p>
<p class="endtd"></p>
</th></tr>
<tr>
<td>LDO </td><td><p class="starttd">Low dropout linear regulator. The functions that manage this block are grouped as <a class="el" href="group__group__syspm__functions__ldo.html">LDO</a> under <a class="el" href="group__group__syspm__functions__core__regulators.html">Core Voltage Regulation</a> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td>SIMO Buck </td><td><p class="starttd">Single inductor multiple Output Buck regulator, referred as "Buck regulator" throughout the documentation. The functions that manage this block are grouped as <a class="el" href="group__group__syspm__functions__buck.html">Buck</a> under <a class="el" href="group__group__syspm__functions__core__regulators.html">Core Voltage Regulation</a> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td>SISO Buck </td><td><p class="starttd">Single inductor single output Buck regulator, referred as "Buck regulator" throughout the documentation. The functions that manage this block are grouped as <a class="el" href="group__group__syspm__functions__buck.html">Buck</a> under <a class="el" href="group__group__syspm__functions__core__regulators.html">Core Voltage Regulation</a> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td>PMIC </td><td><p class="starttd">Power management integrated circuit. The functions that manage this block are grouped as <a class="el" href="group__group__syspm__functions__pmic.html">PMIC</a> </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td>LP </td><td><p class="starttd">System low power mode. See the <a class="el" href="group__group__syspm.html#group_syspm_switching_into_lp">Switching the System into Low Power</a> section for details. </p>
<p class="endtd"></p>
</td></tr>
<tr>
<td>ULP </td><td>System ultra low power mode. See the <a class="el" href="group__group__syspm.html#group_syspm_switching_into_ulp">Switching the System into Ultra Low Power</a> section for details.  </td></tr>
</table>
<h1><a class="anchor" id="group_syspm_section_more_information"></a>
More Information</h1>
<p>For more information on the SysPm driver, refer to the technical reference manual (TRM).</p>
<h1><a class="anchor" id="group_syspm_changelog"></a>
Changelog</h1>
<table class="doxtable">
<tr>
<th>Version</th><th>Changes</th><th>Reason for Change </th></tr>
<tr>
<td>5.180 </td><td>Updated APIs: <a class="el" href="group__group__syspm__functions__power.html#ga5b9413044f40ae96064c575c61d3aa1f">Cy_SysPm_Init</a> <a class="el" href="group__group__syspm__functions__power.html#gaaff87adb57f74191a344e996517bd74b">Cy_SysPm_SetDeepSleepMode</a> <a class="el" href="group__group__syspm__functions__power.html#gac80d11f681b462a49a88e3fb90cbfb9a">Cy_SysPm_GetDeepSleepMode</a> <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep</a> <a class="el" href="group__group__syspm__functions__buck.html#gae18d875b522e63828fd66e5d2e99d7bf">Cy_SysPm_CoreBuckStatus</a> <a class="el" href="group__group__syspm__functions__buck.html#ga65e9a1086ed86a194ea00883e0bb954a">Cy_SysPm_RetLdoStatus</a> <a class="el" href="group__group__syspm__functions__buck.html#gabbac947da213af5bcc64b209ae567a31">Cy_SysPm_SramLdoStatus</a> <a class="el" href="group__group__syspm__functions__buck.html#ga4e82ae81d78610493eddefbb8b24d5e6">Cy_SysPm_MiscLdoStatus</a> <a class="el" href="group__group__syspm__functions__power__status.html#gaa04e75e763f98dd2982f0d1bd759c6a1">Cy_SysPm_IsSystemLp</a> <a class="el" href="group__group__syspm__functions__power__status.html#gaffdaf11b8565e3838c8533803eedb70e">Cy_SysPm_IsSystemUlp</a> <a class="el" href="group__group__syspm__functions__power__status.html#gaf1bb1905ac80bb1028911bb1c2bbf100">Cy_SysPm_IsSystemHp</a>  </td><td>Code improvements and new functionality for CAT1D devices.  </td></tr>
<tr>
<td>5.170 </td><td>Updated API <a class="el" href="group__group__syspm__functions__power__status.html#ga2b25c32ff6bc5f899352e4a8102af23f">Cy_SysPm_ReadStatus</a> for MPN defined supported core checks. </td><td>Code improvements and bug fixes.  </td></tr>
<tr>
<td rowspan="3">5.160 </td><td>Updated APIs: <a class="el" href="group__group__syspm__functions__power.html#gab09936e85606de476a0c379f9548603f">Cy_SysPm_CpuEnterSleep</a> <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep</a> <a class="el" href="group__group__syspm__functions__general.html#ga300fc24bbd19d12771dc2dd472658ab7">Cy_SysPm_RestoreRegisters</a> <a class="el" href="group__group__syspm__functions__power.html#gaaff87adb57f74191a344e996517bd74b">Cy_SysPm_SetDeepSleepMode</a>  </td><td>Code improvements and bug fixes.  </td></tr>
<tr>
<td>Updated enumerators: <a class="el" href="group__group__syspm__data__enumerates.html#ga64b1d9370a07008a83b14bcbee4f731c">cy_en_syspm_hvldo_voltage_t</a>. </td><td>Fixed enumerator's names to represent an actual HVLDO configuration.  </td></tr>
<tr>
<td>Newly added APIs <a class="el" href="group__group__syspm__functions__power.html#ga147ce56f8ab7be2c4af0b9fb95a04221">Cy_SysPm_SetPPUDeepSleepMode</a>. </td><td>Added low power configuration for CAT1D devices.  </td></tr>
<tr>
<td>5.150 </td><td>Updated Cy_SysPm_SaveRegisters and Cy_SysPm_RestoreRegisters to support parts which do not implement UDB. </td><td>Added support for FX3G2 (CAT1A).  </td></tr>
<tr>
<td>5.140 </td><td>Update to cy_en_syspm_hibernate_wakeup_source_t. </td><td>Minor defect fixing.  </td></tr>
<tr>
<td>5.130 </td><td>Added support for new device. </td><td>Added support for TRAVEO&trade; II Cluster (CAT1C).  </td></tr>
<tr>
<td>5.120 </td><td>Added support for new device. </td><td>Added support for PSOC C3 (CAT1B).  </td></tr>
<tr>
<td>5.110 </td><td>Newly Added API Cy_BTSS_PowerDepResetCount and updated <a class="el" href="group__group__syspm__btss__functions.html#ga1a3377532505060f34dcf05f79b08815">Cy_BTSS_PowerDep</a>. </td><td>Fixed race condition in PDCM locking/release.  </td></tr>
<tr>
<td>5.100 </td><td>Added support for TRAVEO&trade; II Body Entry devices.<br />
 Pre-processor check for MXS40SRSS version now groups ver. 2 with ver. 3. Previously ver. 2 was grouped with ver. 1. API Cy_SysPm_IsDeepSleepRegEnabled is now only available for ULP variant devices.<br />
 API Cy_SysPm_ReghcSelectMode is now only available for devices with REGHC or HTRREGHC. Previously all MXS40SRSSv3 devices.<br />
 API Cy_SysPm_PmicEnable is now only available for MXS40SRSSv1 devices, or if BACKUP_VBCK IP is present. </td><td>Code enhancement and support for new devices.  </td></tr>
<tr>
<td>5.95 </td><td>Added new APIs Cy_SysPm_StoreDSContext_Wfi, <a class="el" href="group__group__syspm__functions__power.html#gac1b5589eaaa7ac4fda44b666cc0ff22c">Cy_SysPm_TriggerXRes</a> and few macros. </td><td>Code enhancements .  </td></tr>
<tr>
<td rowspan="5">5.94 </td><td>Newly added APIs <a class="el" href="group__group__syspm__functions__general.html#ga338c546bbd9227c75ada5bc85b1bf615">Cy_SysPm_SetSOCMemPartActivePwrMode</a>, <a class="el" href="group__group__syspm__functions__general.html#gaaf1abb0c8670b67d9bfb299d9d77a990">Cy_SysPm_SetSOCMemPartDsPwrMode</a>, <a class="el" href="group__group__syspm__functions__general.html#ga2851806aea4e38ff40c277841c07572c">Cy_SysPm_GetSOCMemSramPartActivePwrMode</a>, <a class="el" href="group__group__syspm__functions__general.html#gac056944172fccc3eb347a6ce4d62f320">Cy_SysPm_GetSOCMemSramPartDsPwrMode</a>  </td><td>Support of SOCMEM control for CAT1D devices added .  </td></tr>
<tr>
<td>Newly added APIs <a class="el" href="group__group__syspm__functions__reghc.html#ga09c461654f8d41bb0badd96bbfb4c7ad">Cy_SysPm_ReghcConfigure</a>, <a class="el" href="group__group__syspm__functions__reghc.html#ga8b2da4b8c544a0f8f65efe191346af26">Cy_SysPm_ReghcDeConfigure</a>. </td><td>Added REGHC configuration support for CAT1C devices .  </td></tr>
<tr>
<td>Newly added APIs <a class="el" href="group__group__syspm__functions__power.html#ga32b4d52191d6bd433a43e17f7b795c58">Cy_SysPm_SetSysDeepSleepMode</a>, <a class="el" href="group__group__syspm__functions__power.html#ga5bf456009a867946d735f682724d9aa6">Cy_SysPm_SetAppDeepSleepMode</a>, <a class="el" href="group__group__syspm__ppu__functions.html#gad0c77c7391189f11074d3f83c26168f0">cy_pd_ppu_set_static_power_mode</a>. </td><td>DEEPSLEEP support for CAT1D devices added.  </td></tr>
<tr>
<td>Newly added APIs <a class="el" href="group__group__syspm__functions__power__status.html#ga985529756aefbf864a9efa20f1817abd">Cy_SysPm_Cm33IsActive</a>, <a class="el" href="group__group__syspm__functions__power__status.html#ga99ec4f23581a115cbcc0a05a272283a4">Cy_SysPm_Cm33IsSleep</a>, <a class="el" href="group__group__syspm__functions__power__status.html#gaecc0551908eb1b88e112405926d57426">Cy_SysPm_Cm33IsDeepSleep</a>, <a class="el" href="group__group__syspm__functions__power__status.html#ga8b7b6d090865e9fb8ef55fce2a8b2a46">Cy_SysPm_Cm55IsActive</a>, <a class="el" href="group__group__syspm__functions__power__status.html#ga9d1b52153b2107bd69f799cd6b34f2f1">Cy_SysPm_Cm55IsSleep</a>. </td><td>Support for Core status check added for CAT1D devices .  </td></tr>
<tr>
<td>Newly added APIs <a class="el" href="group__group__syspm__functions__buck.html#gadaf8a1544f32636a1165db7193307f42">Cy_SysPm_SramLdoEnable</a>, <a class="el" href="group__group__syspm__functions__buck.html#ga6d4e984623a0bbe1797cc6c1dacfba46">Cy_SysPm_SramLdoSetVoltage</a>, <a class="el" href="group__group__syspm__functions__buck.html#gafd2104ec9ac05913ed5146a21b2a709b">Cy_SysPm_SramLdoGetVoltage</a>. </td><td>Support for SRAMLDO Regulator added for CAT1D devices .  </td></tr>
<tr>
<td>5.93 </td><td>Bug fix in definition of LPCOMP1 as wake-up source. </td><td>The low power comparator #1 was unable to wake-up the system from hibernate state.  </td></tr>
<tr>
<td>5.92 </td><td>Support for CAT1D devices is added </td><td>New devices support added  </td></tr>
<tr>
<td>5.91 </td><td>Updated <a class="el" href="group__group__syspm__functions__power.html#ga5b9413044f40ae96064c575c61d3aa1f">Cy_SysPm_Init()</a> function. </td><td>To remove the clearing of reset reason.  </td></tr>
<tr>
<td>5.90 </td><td>Added new function <a class="el" href="group__group__syspm__functions__backup.html#ga0d4a41fe70f20ca3ea7b2e78994004ae">Cy_SysPm_SetupDeepSleepRAM()</a>.  </td><td>Added support for DSRAM Setup for CAT1B devices.  </td></tr>
<tr>
<td rowspan="4">5.80 </td><td>Support for CAT1C devices.  </td><td>Power Management support for CAT1C devices. </td></tr>
<tr>
<td><p class="starttd">New API's Added/Modified</p><ul>
<li><a class="el" href="group__group__syspm__functions__power__status.html#gadc84fd1eeccad0a0561b69b1278cf75b" title="Get the power mode status of Bandgap Ref Circuits. ">Cy_SysPm_IsBgRefCtrl()</a></li>
<li><a class="el" href="group__group__syspm__functions__power__status.html#gaa5ea8ab7f994a0cfe9268cec1f3ec91c" title="Enables/Disables powers mode of Bandgap Ref Circuits. ">Cy_SysPm_BgRefCtrl()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#ga3134f6b474d6bba15825971923349372" title="Configures the core LDO regulator operating mode to one of three modes. ">Cy_SysPm_LdoSetMode()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#ga5d545d75711f6aa1889ec5faa871d9fb" title="Returns the current core LDO regulator operating mode. ">Cy_SysPm_LdoGetMode()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#ga9902e6f64bd939f234fe15612d0f1da8" title="Reads the current status of the core LDO regulator. ">Cy_SysPm_LdoIsEnabled()</a></li>
<li><a class="el" href="group__group__syspm__functions__power__status.html#gaedc88873d19449d733cb529453c9cdc5" title="Checks if CM7 is in the active mode. ">Cy_SysPm_Cm7IsActive()</a></li>
<li><a class="el" href="group__group__syspm__functions__power__status.html#ga0df948c8addc2c24d32895388d64374f" title="Checks if the CM7 is in the sleep mode. ">Cy_SysPm_Cm7IsSleep()</a></li>
<li><a class="el" href="group__group__syspm__functions__power__status.html#ga3ac97e5b392cb7b1bd9f7e7ca62da6a6" title="Checks if the CM7 is in the deep sleep mode. ">Cy_SysPm_Cm7IsDeepSleep()</a></li>
<li>Cy_SysPm_Cm7IsLowPower()</li>
<li><a class="el" href="group__group__syspm__functions__power__status.html#ga21d2910a7f711e336996948780074f0d" title="Checks if the CM0+ is in CPU Active mode. ">Cy_SysPm_Cm0IsActive()</a></li>
<li><a class="el" href="group__group__syspm__functions__power__status.html#gaacf9cb78aa18a819b22b242d552474af" title="Checks if the CM0+ is in CPU Sleep mode. ">Cy_SysPm_Cm0IsSleep()</a></li>
<li>Cy_SysPm_Cm0IsLowPower()</li>
<li><a class="el" href="group__group__syspm__functions__power__status.html#ga04710a41511c71d5381cab1d2318a8e1" title="Checks if the CM0+ is in CPU Deep Sleep mode. ">Cy_SysPm_Cm0IsDeepSleep()</a></li>
<li><a class="el" href="group__group__syspm__functions__power__status.html#gaa04e75e763f98dd2982f0d1bd759c6a1" title="Checks if the system is in LP mode. ">Cy_SysPm_IsSystemLp()</a></li>
<li><a class="el" href="group__group__syspm__functions__pmic.html#ga0a65826b5bbb61c785e3016dc4eff39b" title="Enable the external PMIC controller that supplies Vddd (if present). ">Cy_SysPm_PmicEnable()</a></li>
<li><a class="el" href="group__group__syspm__functions__pmic.html#ga9cd99bbe881163eb76791e8474e4bbcb" title="Disable the external PMIC controller that supplies Vddd (if present). ">Cy_SysPm_PmicDisable()</a></li>
<li><a class="el" href="group__group__syspm__functions__pmic.html#gac7cb78836a7fd272e1b3b1b76bf7917f" title="Enable the external PMIC controller that supplies Vddd (if present) and force active. ">Cy_SysPm_PmicAlwaysEnable()</a></li>
<li><a class="el" href="group__group__syspm__functions__pmic.html#ga2c6eadbd1e5f2ca43e959a1153aa8e3a" title="Enables the PMIC controller output pin. ">Cy_SysPm_PmicEnableOutput()</a></li>
<li><a class="el" href="group__group__syspm__functions__pmic.html#ga3110205ee0e5d422d3ec534953b6c0ed" title="Disables the PMIC controller output pin. ">Cy_SysPm_PmicDisableOutput()</a></li>
<li><a class="el" href="group__group__syspm__functions__pmic.html#ga7b4ea274cd13069239a54244b343f625" title="Locks the PMIC control controller register so that no changes can be made. ">Cy_SysPm_PmicLock()</a></li>
<li><a class="el" href="group__group__syspm__functions__pmic.html#gacc9a1ba737ee1907cdb658c24ed90a6c" title="Unlocks the PMIC control register so that changes can be made. ">Cy_SysPm_PmicUnlock()</a></li>
<li><a class="el" href="group__group__syspm__functions__pmic.html#ga16cd1f03066cbfbebcd936bc172820f1" title="This function returns the status of the PMIC controller. ">Cy_SysPm_PmicIsEnabled()</a></li>
<li><a class="el" href="group__group__syspm__functions__pmic.html#ga4ba48bd0721a884c5b0c07114d5bb3ee" title="This function returns the status of the PMIC controller output. ">Cy_SysPm_PmicIsOutputEnabled()</a></li>
<li><a class="el" href="group__group__syspm__functions__pmic.html#ga57dbfc7c1713ba6cea79bacddbd8d187" title="Returns the PMIC controller lock status. ">Cy_SysPm_PmicIsLocked()</a></li>
<li><a class="el" href="group__group__syspm__functions__ovd.html#ga281eb6cda7b0af2aa5660d3e53df0381" title="Enables OVD over either VDDD or VDDA or VCCD. ">Cy_SysPm_OvdEnable()</a></li>
<li><a class="el" href="group__group__syspm__functions__ovd.html#ga183f41d01c8e34e7217d3e8a2321a1d1" title="Disables OVD over either VDDD or VDDA or VCCD. ">Cy_SysPm_OvdDisable()</a></li>
<li><a class="el" href="group__group__syspm__functions__ovd.html#ga898103e00c1e46dfe5e586d6b8661ca0" title="Selects voltage threshold for OVD on VDDD. ">Cy_SysPm_OvdVdddSelect()</a></li>
<li><a class="el" href="group__group__syspm__functions__ovd.html#ga813fa0e79732aa2799e30f5f6fd4e199" title="Selects voltage threshold for OVD on VDDA. ">Cy_SysPm_OvdVddaSelect()</a></li>
<li><a class="el" href="group__group__syspm__functions__ovd.html#gae4e21d09c38fcf794d76936397bd46da" title="Sets the action taken when the threshold is crossed in the programmed directions(s) for VDDA...">Cy_SysPm_OvdActionSelect()</a></li>
<li><a class="el" href="group__group__syspm__functions__bod.html#ga413777ded660fe89b5f9aad08d6b952b" title="Enables BOD over either VDDD or VDDA or VCCD. ">Cy_SysPm_BodEnable()</a></li>
<li><a class="el" href="group__group__syspm__functions__bod.html#ga0b9d1a5605c7cbf9470d86367c5360fc" title="Disables BOD over either VDDD or VDDA or VCCD. ">Cy_SysPm_BodDisable()</a></li>
<li><a class="el" href="group__group__syspm__functions__bod.html#ga6b72592226d8c3d19b862807d5c2acdb" title="Selects voltage threshold for BOD on VDDD. ">Cy_SysPm_BodVdddSelect()</a></li>
<li><a class="el" href="group__group__syspm__functions__bod.html#ga3c27a998f20f64d7914fdae6704726dc" title="Selects voltage threshold for BOD on VDDA. ">Cy_SysPm_BodVddaSelect()</a></li>
<li><a class="el" href="group__group__syspm__functions__bod.html#ga29eb146abddee0195f35934dc9ec03e8" title="Sets the action taken when the threshold is crossed in the programmed directions(s) for VDDA...">Cy_SysPm_BodActionSelect()</a></li>
<li><a class="el" href="group__group__syspm__functions__bod.html#ga0cab924b8ed6da65736da301d23166ea" title="Supply Status. ">Cy_SysPm_SupplySupervisionStatus()</a></li>
<li><a class="el" href="group__group__syspm__functions__power.html#ga945ba75666ab90b16c66128853ffa820" title="Check whether the system regulator is set to minimal current mode. ">Cy_SysPm_SystemIsMinRegulatorCurrentSet()</a></li>
<li><a class="el" href="group__group__syspm__functions__linearreg.html#gac21817c2dc6ce6b8ae8dbbf5a6a1ccd0" title="Disables internal linear regulator. ">Cy_SysPm_LinearRegDisable()</a></li>
<li><a class="el" href="group__group__syspm__functions__linearreg.html#ga0762532322928a03d58dd7a832412bdb" title="Enables internal linear regulator. ">Cy_SysPm_LinearRegEnable()</a></li>
<li><a class="el" href="group__group__syspm__functions__linearreg.html#ga50a4a2ed35cbe5f365a15ac636a5a608" title="Check the status of the internal linear regulator. ">Cy_SysPm_LinearRegGetStatus()</a></li>
<li><a class="el" href="group__group__syspm__functions__linearreg.html#ga0c235d7d3dae4893107e4af9fbff320c" title="Disables internal DeepSleep regulator. ">Cy_SysPm_DeepSleepRegDisable()</a></li>
<li><a class="el" href="group__group__syspm__functions__linearreg.html#ga579931e97aad928952751f79ca18c513" title="Enables internal DeepSleep regulator. ">Cy_SysPm_DeepSleepRegEnable()</a></li>
<li><a class="el" href="group__group__syspm__functions__linearreg.html#ga8c345ed365ec9055b19bc8373ae6affd" title="Checks if internal DeepSleep regulator is enabled or not. ">Cy_SySPm_IsDeepSleepRegEnabled()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga5b38bd09eff10c6be3819a1049def9ed" title="Selects one of the supported REGHC modes. ">Cy_SysPm_ReghcSelectMode()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga0a86cbf04f6cdb424af8110901ee5e6b" title="Gets the supported REGHC modes. ">Cy_SysPm_ReghcGetMode()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#gae344a8f1994f09b53658c03e2ad7450f" title="Selects DRV_OUT setting. ">Cy_SysPm_ReghcSelectDriveOut()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#gaf75a21f459f30958c5d8f8def8fd8d88" title="Gets the DRV_OUT setting. ">Cy_SysPm_ReghcGetDriveOut()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga72ef55e062ebadd60c18d5dbbe2d3ae1" title="Selects regulator output voltage adjustment. ">Cy_SysPm_ReghcAdjustOutputVoltage()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#gaa759b73962c6c36e51dfbcb6c5757233" title="Internal Active Linear Regulator disabled after PMIC enabled. ">Cy_SysPm_ReghcDisableIntSupplyWhileExtActive()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#gac70a573bd711c44b0fdc8c47c7608aa9" title="Internal Active Linear Regulator kept enabled. ">Cy_SysPm_ReghcEnableIntSupplyWhileExtActive()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga2495b845721e4e01c7aad0ae2bcb8e73" title="Disables &quot;PMIC enable&quot; output. ">Cy_SysPm_ReghcDisablePmicEnableOutput()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#gab54d6694493db2a2eb49f919a26aa19b" title="Enables &quot;PMIC enable&quot; output. ">Cy_SysPm_ReghcEnablePmicEnableOutput()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga9702daa834fa37410c33d40b241b5a61" title="Enables receiving status from PMIC. ">Cy_SysPm_ReghcEnablePmicStatusInput()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga20d6bc956fe0fa57d522d97917796bf7" title="Disables PMIC status input. ">Cy_SysPm_ReghcDisablePmicStatusInput()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga90aa72d07f2f8a3232a54565dca0dff3" title="Wait count in 4us steps after PMIC status ok. ">Cy_SysPm_ReghcSetPmicStatusWaitTime()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga02c3c224063acac4adf31d04d324d5d0" title="Indicates that the REGHC has been configured. ">Cy_SysPm_ReghcIsConfigured()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga5a842243bc692f4f9fd9121e20a15df1" title="Set REGHC is configured. ">Cy_SysPm_ReghcSetConfigured()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga5c3db95d452007033cf3b56240cd07a5" title="Disables REGHC. ">Cy_SysPm_ReghcDisable()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#gaed5375c0f70578868196aa81a5381e40" title="Enables REGHC. ">Cy_SysPm_ReghcEnable()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga77aefe38a6b9c2ef286f28e751448425" title="Disables timeout when waiting for REGHC_PMIC_STATUS_OK. ">Cy_SysPm_ReghcDisablePmicStatusTimeout()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga189156ffa93ef9198a0cf554b5287be7" title="Enables timeout while waiting for REGHC_PMIC_STATUS_OK==1 when switching to PMIC. ...">Cy_SysPm_ReghcEnablePmicStatusTimeout()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#gaaa0ef90002571054877674135ff1f377" title="Indicates the state of the REGHC enable/disable sequencer. ">Cy_SysPm_ReghcIsEnabled()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga38c3848dfdc8e01768a00fbc5fcddae6" title="Indicates the PMIC status is ok. ">Cy_SysPm_ReghcIsStatusOk()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga2c3a18fc3131a6c3a0eb168ae65f83e1" title="Indicates whether the REGHC circuit is busy. ">Cy_SysPm_ReghcIsSequencerBusy()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#gadc5a116547178382207c16e581326ba7" title="Device does not generate VADJ, and it must not be part of the PMIC feedback loop. ...">Cy_SysPm_ReghcDisableVAdj()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga1f082ab65c0465773869e42c34f7482d" title="Device generates VADJ when PMIC is enabled. ">Cy_SysPm_ReghcEnableVAdj()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga2394eba4a2c01dd7635264064c9ecc1d" title="Device operates from internal regulators during DEEPSLEEP. ">Cy_SysPm_ReghcDisablePmicInDeepSleep()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#gaaeefdc910ed08e7ad971a768a1689900" title="DEEPSLEEP transition does not change PMIC enable. ">Cy_SysPm_ReghcEnablePmicInDeepSleep()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#ga0b5ea65f1366f12e007c16693f51909e" title="Indicates the over-current detector is operating and the current drawn from REGHC is within limits...">Cy_SysPm_ReghcIsOcdWithinLimits()</a></li>
<li><a class="el" href="group__group__syspm__functions__reghc.html#gaa6f970a2976b4cfd81993031202a5e45" title="Indicates the REGHC circuit is enabled and operating. ">Cy_SysPm_ReghcIsCircuitEnabledAndOperating()</a></li>
</ul>
<p class="endtd"></p>
</td><td>New API's to handle CAT1C devices. </td></tr>
<tr>
<td>Added <a class="el" href="group__group__syspm__functions__ovd.html">OVD</a>, <a class="el" href="group__group__syspm__functions__bod.html">BOD</a>, <a class="el" href="group__group__syspm__functions__linearreg.html">Linear Regulator</a> and <a class="el" href="group__group__syspm__functions__reghc.html">REGHC (High Current Regulator)</a> API's. </td><td>New API's to handle Power Management in CAT1C Devices.  </td></tr>
<tr>
<td>Added following functions for BTSS IP Reset: <a class="el" href="group__group__syspm__btss__functions.html#ga5c335b956a1ec7f833ed7bbffd2cdb48">Cy_BTSS_AssertReset()</a>, <a class="el" href="group__group__syspm__btss__functions.html#gaeba4013320dd39c61dd12c1b21b4d0cd">Cy_BTSS_IsResetAsserted()</a>,  </td><td>Added API's to support for BTSS IP Reset.  </td></tr>
<tr>
<td rowspan="3">5.70 </td><td>Support for CAT1B devices.  </td><td>Power Management support for CAT1B devices. </td></tr>
<tr>
<td><p class="starttd">New API's Added</p><ul>
<li><a class="el" href="group__group__syspm__functions__power.html#ga5b9413044f40ae96064c575c61d3aa1f" title="Initializes SysPm Driver. ">Cy_SysPm_Init()</a></li>
<li><a class="el" href="group__group__syspm__functions__power.html#gae5b8fe608ae9052382b242d29d34d4b9" title="Change the system from ACTIVE Profile to LPACTIVE (Low Power Active)/LPSLEEP (Low Power Sleep) Profil...">Cy_SysPm_SystemLpActiveEnter()</a></li>
<li><a class="el" href="group__group__syspm__functions__power.html#ga81d08ce12e3dd770c48e8bc23246c18f" title="Changes the system from LPACTIVE (Low Power Active)/LPSLEEP (Low Power Sleep) Profile to ACTIVE Profi...">Cy_SysPm_SystemLpActiveExit()</a></li>
<li><a class="el" href="group__group__syspm__functions__power.html#gaedd38e42919449afe22a9e1dc2c6cac7" title="Checks if the system is in LPACTIVE (Low Power Active)/LPSLEEP (Low Power Sleep) Profile. ">Cy_SysPm_IsSystemLpActiveEnabled()</a></li>
<li><a class="el" href="group__group__syspm__functions__power.html#gaaff87adb57f74191a344e996517bd74b" title="Set the deepsleep mode - deepsleep or deepsleep-ram or deepsleep-off. ">Cy_SysPm_SetDeepSleepMode()</a></li>
<li><a class="el" href="group__group__syspm__functions__power.html#gac80d11f681b462a49a88e3fb90cbfb9a" title="Get the overall system&#39;s deepsleep mode - deepsleep or deepsleep-ram or deepsleep-off. ">Cy_SysPm_GetDeepSleepMode()</a></li>
<li><a class="el" href="group__group__syspm__functions__power.html#ga50b3751b0c4bc09d0385b27f95a99a39" title="Checks from which Deep Sleep mode the system has woke up. ">Cy_SysPm_GetBootMode()</a></li>
<li><a class="el" href="group__group__syspm__functions__power.html#ga7b9be88cbcc9d3b140c402a6feff20fe" title="Triggers the System Soft reset. ">Cy_SysPm_TriggerSoftReset()</a></li>
<li><a class="el" href="group__group__syspm__functions__power.html#gafc7877f22758499d5d199401cd60f28f" title="This function gets the wakeup cause for Hibernate mode. ">Cy_SysPm_GetHibernateWakeupCause()</a></li>
<li><a class="el" href="group__group__syspm__functions__power.html#ga5e114fa9274e2cb4073ed5cf837d780c" title="This function Clears the wakeup cause register. ">Cy_SysPm_ClearHibernateWakeupCause()</a></li>
<li><a class="el" href="group__group__syspm__functions__buck.html#gafc7cc0144b114ef25dc22bc3b62ee48b" title="Set the Core Buck Regulator Voltage. ">Cy_SysPm_CoreBuckSetVoltage()</a></li>
<li><a class="el" href="group__group__syspm__functions__buck.html#ga6f90ab492004c407e2a2e9437747add0" title="Get the Core Buck Regulator Voltage. ">Cy_SysPm_CoreBuckGetVoltage()</a></li>
<li><a class="el" href="group__group__syspm__functions__buck.html#gae562b4b5f57c089ba7f99b6ed1ec4f70" title="Set the Core Buck Regulator mode. ">Cy_SysPm_CoreBuckSetMode()</a></li>
<li><a class="el" href="group__group__syspm__functions__buck.html#ga41d5506518f466aabea598d48cf5db9f" title="Get the Core Buck Regulator Mode. ">Cy_SysPm_CoreBuckGetMode()</a></li>
<li><a class="el" href="group__group__syspm__functions__buck.html#gadf48f25b461d9b7e5b5f1c8db9d97249" title="Configures the Core Buck Regulator. ">Cy_SysPm_CoreBuckConfig()</a></li>
<li><a class="el" href="group__group__syspm__functions__buck.html#gae18d875b522e63828fd66e5d2e99d7bf" title="Get the status of Core Buck Regulator. ">Cy_SysPm_CoreBuckStatus()</a></li>
<li><a class="el" href="group__group__syspm__functions__buck.html#ga630b7dcea7341187b54176f860023083" title="Configures the Extra Requester for Core Buck Regulator. ">Cy_SysPm_LdoExtraRequesterConfig()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#ga00ae492b61f731af99f3f378e640e82c" title="Configures the SDR(Step Down Regulator) ">Cy_SysPm_SdrConfigure()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#gadee6863d26fa2d5edf2631e265890aca" title="Set the SDR(Step Down Regulator) Voltage. ">Cy_SysPm_SdrSetVoltage()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#gae44ed9b76b5c3d3362f4c05b981d3811" title="Get the SDR(Step Down Regulator) Voltage. ">Cy_SysPm_SdrGetVoltage()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#gaa3fba12a46b88e6065a29d571d86b9cd" title="Enable the SDR(Step Down Regulator) ">Cy_SysPm_SdrEnable()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#ga674c55d4039bdd8f3edadabc77d8ebea" title="Checks if SDR(Step Down Regulator) is enabled or not. ">Cy_SysPm_IsSdrEnabled()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#gac91039d9210a0acdf5335cf839680f87" title="Configures the HVLDO Regulator. ">Cy_SysPm_HvLdoConfigure()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#ga75ff19a75ee1a483fa0f5b3c50157cd4" title="Set the HVLDO Regulator Voltage. ">Cy_SysPm_HvLdoSetVoltage()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#ga462f8b51cd933b85d270d64fe00bdafa" title="Get the HVLDO Regulator Voltage. ">Cy_SysPm_HvLdoGetVoltage()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#ga25bdb2ff02fd26194f094ab7b144eaba" title="Enable the HVLDO Regulator. ">Cy_SysPm_HvLdoEnable()</a></li>
<li><a class="el" href="group__group__syspm__functions__ldo.html#ga085d5c511f849d5846338f79c1e7778f" title="Checks if HVLDO Regulator is enabled or not. ">Cy_SysPm_IsHvLdoEnabled()</a></li>
<li><a class="el" href="group__group__syspm__functions__iofreeze.html#ga5df20917d995755606672fac961e8e9b" title="This function unfreezes the I/O cells that are automatically frozen when Hibernate is entered with th...">Cy_SysPm_IoUnfreeze()</a></li>
<li><a class="el" href="group__group__syspm__functions__iofreeze.html#ga09d3a037917bd2e02d9e9e500ae700ab" title="Checks whether IOs are frozen during DEEPSLEEP-RAM/OFF. ">Cy_SysPm_DeepSleepIoIsFrozen()</a></li>
<li><a class="el" href="group__group__syspm__functions__iofreeze.html#gab725010772eda4fcfc2412fef03ef3d0" title="This function unfreezes the I/O cells that are automatically frozen when DEEPSLEEP-RAM/OFF is entered...">Cy_SysPm_DeepSleepIoUnfreeze()</a></li>
<li><a class="el" href="group__group__syspm__functions__backup.html#gaaad0d60d7cd653e0651f6eb4e66ab02f" title="Stores supported number of words(SRSS_BACKUP_NUM_BREG) in Backup Domain. ">Cy_SysPm_BackupWordStore()</a></li>
<li><a class="el" href="group__group__syspm__functions__backup.html#gad101a96506a0ea0ef62f2a09af94be55" title="Restores supported number of words(SRSS_BACKUP_NUM_BREG) in Backup Domain. ">Cy_SysPm_BackupWordReStore()</a></li>
<li><a class="el" href="group__group__syspm__functions__backup.html#ga0ad6666907cdc8668196bc5e849cd7f1" title="Sets executing CPU to the Deep Sleep mode forceful RAM OFF. ">Cy_SysPm_CpuEnterRAMOffDeepSleep()</a></li>
</ul>
<p class="endtd"></p>
</td><td>New API's to handle CAT1B devices. </td></tr>
<tr>
<td>Added <a class="el" href="group__group__syspm__ppu.html">PPU (Power Policy Unit)</a>, <a class="el" href="group__group__syspm__pdcm.html">PDCM (Power Dependency Control Matrix)</a> and <a class="el" href="group__group__syspm__btss.html">BTSS Host API(Bluetooth Sub System Host API)</a> API's. </td><td>New API's to handle Power Management in CAT1B Devices.   </td></tr>
<tr>
<td rowspan="2">5.60 </td><td>For PSoC64 device, allow CM0+ to call CY_PRA_FUNCTION_CALL_X_X API in functions accessing FUNCTION_POLICY registers. So that System Configuration structure is updated with new parameters.  </td><td>For PSoC64 device, System configuration can be done from CM0+ application.  </td></tr>
<tr>
<td>Fixed MISRA 2012 violations. </td><td>MISRA 2012 compliance.  </td></tr>
<tr>
<td>5.50 </td><td>Added following functions for SRAM power mode configuration: <a class="el" href="group__group__syspm__functions__general.html#ga05204555cfdd18da26aa8e615359484f">Cy_SysPm_SetSRAMMacroPwrMode()</a>, <a class="el" href="group__group__syspm__functions__general.html#ga42e3e9a5780971ac8dc0f84519f9cac5">Cy_SysPm_SetSRAMPwrMode()</a>, <a class="el" href="group__group__syspm__functions__general.html#gaad339304ab3d1f6f0201f6ef1297c856">Cy_SysPm_GetSRAMMacroPwrMode()</a>. For PSoC 64 devices these functions can return PRA driver status value.  </td><td>Added support for SRAM power mode configuration.  </td></tr>
<tr>
<td>5.40 </td><td>Support for CM33. </td><td>New devices support.  </td></tr>
<tr>
<td rowspan="3">5.30 </td><td>Updated <a class="el" href="group__group__syspm__functions__ldo.html#gaa583169f7b72095e98650fc30dfbcb24">Cy_SysPm_LdoSetVoltage()</a> and <a class="el" href="group__group__syspm__functions__power.html#ga3bde7056544d0ada3da80a0f58fefab9" title="Sets the system into minimum core regulator current mode. ">Cy_SysPm_SystemSetMinRegulatorCurrent()</a> to extend the wakeup delay from Deep Sleep for 1.1 V LDO for the case when system regulator is configured to the minimum current mode. Please refer to <a class="el" href="group__group__syspm.html#group_syspm_system_reg_curr_mode">System Regulator Current Mode</a> for the more details on system regulator modes.  </td><td>Ensure valid VCCD upon wakeup for the system regulator's minimum current mode.  </td></tr>
<tr>
<td>Fixed MISRA 2012 violations. </td><td>MISRA 2012 compliance.  </td></tr>
<tr>
<td>Updated the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a> function to ensure the Low-power mode entry abort when a system call initiated by Cortex-M4 or Cortex-M0+ is pending. </td><td>Fixed the issue when the non-blocking flash write initiated by the Cortex-M4 application fails to complete because the Cortex-M0+ CPU is in Deep Sleep mode.  </td></tr>
<tr>
<td>5.20 </td><td>Updated <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a> function for the CYB06xx7 devices.  </td><td>Added CYB06xx7 device support.  </td></tr>
<tr>
<td rowspan="3">5.10 </td><td>Updated the following functions for the PSoC 64 devices: <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a>, <a class="el" href="group__group__syspm__functions__power.html#ga72531fcca015df727a163b510639a334">Cy_SysPm_SystemEnterLp()</a>, <a class="el" href="group__group__syspm__functions__power.html#gaca7c8f1ab6d555530a68978269198836">Cy_SysPm_SystemEnterUlp</a>, <a class="el" href="group__group__syspm__functions__power.html#gae97647a28c370674ba57d451d21d1c51">Cy_SysPm_SystemEnterHibernate</a>, <a class="el" href="group__group__syspm__functions__power.html#ga2540970e6c27efa25752efc43da0d622">Cy_SysPm_SetHibernateWakeupSource</a>, <a class="el" href="group__group__syspm__functions__power.html#ga5cb3a837b9c441f4806c7550e6a0b026">Cy_SysPm_ClearHibernateWakeupSource</a>, <a class="el" href="group__group__syspm__functions__power.html#ga3bde7056544d0ada3da80a0f58fefab9">Cy_SysPm_SystemSetMinRegulatorCurrent</a>, <a class="el" href="group__group__syspm__functions__power.html#ga54112d6ea4d40ad241923ee7068f5363">Cy_SysPm_SystemSetNormalRegulatorCurrent</a>, <a class="el" href="group__group__syspm__functions__ldo.html#gaa583169f7b72095e98650fc30dfbcb24">Cy_SysPm_LdoSetVoltage</a>, <a class="el" href="group__group__syspm__functions__ldo.html#ga3134f6b474d6bba15825971923349372">Cy_SysPm_LdoSetMode</a>, <a class="el" href="group__group__syspm__functions__buck.html#ga88ac4d8e9a2ad9fdff09eb5d94de9a12">Cy_SysPm_BuckEnable</a>, <a class="el" href="group__group__syspm__functions__buck.html#gabcdba9193b78620e0e6481f068093376">Cy_SysPm_BuckSetVoltage1</a>, Following functions are updated as unavailable for PSoC 64 devices: <a class="el" href="group__group__syspm__functions__general.html#gaf98b0b378f526cf5542b946c8dcf74ee">Cy_SysPm_WriteVoltageBitForFlash</a>, <a class="el" href="group__group__syspm__functions__general.html#gad4960d176e56bce8631015843a143e1b">Cy_SysPm_SaveRegisters</a>, <a class="el" href="group__group__syspm__functions__general.html#ga300fc24bbd19d12771dc2dd472658ab7">Cy_SysPm_RestoreRegisters</a>, <a class="el" href="group__group__syspm__functions__buck.html#gaf81728d668147ed00ffa52b13a342ece">Cy_SysPm_BuckSetVoltage2</a>, <a class="el" href="group__group__syspm__functions__buck.html#ga67dfa4e4645b5d15f5e8f2626485ffac">Cy_SysPm_BuckEnableVoltage2</a>, <a class="el" href="group__group__syspm__functions__buck.html#ga43463beff3ff5ea3f7048a844a36b0da">Cy_SysPm_BuckDisableVoltage2</a>, <a class="el" href="group__group__syspm__functions__buck.html#gad6f895e81db006be5596b1f304c4c86b">Cy_SysPm_BuckSetVoltage2HwControl</a>, SetReadMarginTrimUlp, SetReadMarginTrimLp, SetWriteAssistTrimUlp, IsVoltageChangePossible.  </td><td>Added PSoC 64 device support.   </td></tr>
<tr>
<td>For PSoC 64 devices the following functions can return PRA driver status value: <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a>, <a class="el" href="group__group__syspm__functions__power.html#gae97647a28c370674ba57d451d21d1c51">Cy_SysPm_SystemEnterHibernate()</a>, <a class="el" href="group__group__syspm__functions__power.html#ga72531fcca015df727a163b510639a334">Cy_SysPm_SystemEnterLp()</a>, <a class="el" href="group__group__syspm__functions__power.html#gaca7c8f1ab6d555530a68978269198836">Cy_SysPm_SystemEnterUlp()</a>, <a class="el" href="group__group__syspm__functions__power.html#ga3bde7056544d0ada3da80a0f58fefab9">Cy_SysPm_SystemSetMinRegulatorCurrent()</a>, <a class="el" href="group__group__syspm__functions__power.html#ga54112d6ea4d40ad241923ee7068f5363">Cy_SysPm_SystemSetNormalRegulatorCurrent()</a>, <a class="el" href="group__group__syspm__functions__ldo.html#gaa583169f7b72095e98650fc30dfbcb24">Cy_SysPm_LdoSetVoltage()</a>, <a class="el" href="group__group__syspm__functions__ldo.html#ga3134f6b474d6bba15825971923349372">Cy_SysPm_LdoSetMode()</a>, <a class="el" href="group__group__syspm__functions__buck.html#ga88ac4d8e9a2ad9fdff09eb5d94de9a12">Cy_SysPm_BuckEnable()</a>, <a class="el" href="group__group__syspm__functions__buck.html#gabcdba9193b78620e0e6481f068093376">Cy_SysPm_BuckSetVoltage1()</a>,  </td><td>For PSoC 64 devices the SysPm driver uses the PRA driver to change the protected registers. A SysPm driver function that calls a PRA driver function will return the PRA error status code if the called PRA function returns an error. In these cases, refer to PRA return statuses <a class="el" href="group__group__pra__enums.html#ga60be13e12e82986f8c0d6c6a6d4f12c5">cy_en_pra_status_t</a>.   </td></tr>
<tr>
<td>Minor documentation updates. </td><td>Documentation enhancement.  </td></tr>
<tr>
<td>5.0 </td><td>Updated the internal IsVoltageChangePossible() function (<a class="el" href="group__group__syspm__functions__ldo.html#gaa583169f7b72095e98650fc30dfbcb24">Cy_SysPm_LdoSetVoltage()</a>, <a class="el" href="group__group__syspm__functions__buck.html#ga88ac4d8e9a2ad9fdff09eb5d94de9a12">Cy_SysPm_BuckEnable()</a>, <a class="el" href="group__group__syspm__functions__buck.html#gabcdba9193b78620e0e6481f068093376">Cy_SysPm_BuckSetVoltage1()</a>, <a class="el" href="group__group__syspm__functions__power.html#gaca7c8f1ab6d555530a68978269198836">Cy_SysPm_SystemEnterUlp()</a> and <a class="el" href="group__group__syspm__functions__power.html#ga72531fcca015df727a163b510639a334">Cy_SysPm_SystemEnterLp()</a> functions are affected). For all the devices except CY8C6xx6 and CY8C6xx7 added the check if modifying the RAM trim register is allowed.  </td><td>Protecting the system from a possible CPU hard-fault cause. If you are using PC &gt; 0 in your project and you want to switch the power modes (LP&lt;-&gt;ULP), you need to unprotect the CPUSS_TRIM_RAM_CTL and CPUSS_TRIM_ROM_CTL registers and can use a programmable PPU for that.   </td></tr>
<tr>
<td rowspan="2">4.50 </td><td>Updated the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a> function. </td><td>Updated the mechanism for saving/restoring not retained UDB and clock registers in the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a> function.   </td></tr>
<tr>
<td>Updated the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a> function to use values stored into the variable instead of reading them directly from SFLASH memory.  </td><td>SFLASH memory can be unavailable to read the correct value after a Deep sleep state on the CY8C6xx6 and CY8C6xx7 devices.   </td></tr>
<tr>
<td>4.40 </td><td>Fixed <a class="el" href="group__group__syspm__functions__ldo.html#gaa583169f7b72095e98650fc30dfbcb24">Cy_SysPm_LdoSetVoltage()</a>, <a class="el" href="group__group__syspm__functions__buck.html#ga88ac4d8e9a2ad9fdff09eb5d94de9a12">Cy_SysPm_BuckEnable()</a>, and <a class="el" href="group__group__syspm__functions__buck.html#gabcdba9193b78620e0e6481f068093376">Cy_SysPm_BuckSetVoltage1()</a> functions. Corrected the sequence for setting the RAM trim value. This behavior is applicable for all devices, except CY8C6xx6 and CY8C6xx7.  </td><td>For all devices, except CY8C6xx6 and CY8C6xx7, the trim sequence was setting incorrect trim values for RAM. This could cause a CPU hard fault.   </td></tr>
<tr>
<td>4.30 </td><td>Corrected the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a> function. Removed early access to flash values after system Deep Sleep, when flash is not ready to be used. Now the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a> function does not access flash until the flash is ready. This behavior is applicable only on multi-CPU devices CY8C6xx6 and CY8C6xx7.  </td><td>For CY8C6xx6 and CY8C6xx7 early access to flash values after system Deep Sleep could potentially cause hard fault. Now after system Deep Sleep only ram values are used before flash is ready.   </td></tr>
<tr>
<td rowspan="3">4.20 </td><td>Updated the <a class="el" href="group__group__syspm__functions__callback.html#ga0d58b00c8dc764a6371590f70e2f73c7">Cy_SysPm_RegisterCallback()</a> function. Added a new element to callback structure - <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a> </td><td>Enhanced the mechanism of callbacks registration and execution. Now callbacks can be ordered during registration. This means the execution flow now is based on <a class="el" href="structcy__stc__syspm__callback__t.html#a13e6dfd81747d61783aac9ca28931fe4" title="Holds the callback execution order value. ">cy_stc_syspm_callback_t.order</a>. For more details, see the <a class="el" href="group__group__syspm.html#group_syspm_cb_registering">Callback Registering</a> section.   </td></tr>
<tr>
<td>Updated <a class="el" href="group__group__syspm.html#group_syspm_cb">SysPm Callbacks</a> section. Added <a class="el" href="group__group__syspm.html#group_syspm_cb_registering">Callback Registering</a> section </td><td>Added explanations how to use updated callbacks registration mechanism.   </td></tr>
<tr>
<td>Added new function <a class="el" href="group__group__syspm__functions__callback.html#gaa6983aaa09683543722f57bbe76b9695">Cy_SysPm_GetFailedCallback()</a> </td><td>Added new functionality to support callback debugging  </td></tr>
<tr>
<td>4.10.1 </td><td>Updated the <a class="el" href="group__group__syspm__functions__backup.html#gad87323df5ca65d861bcb67b03c7ee594" title="This function enables Vbackup supply measurement by the ADC. ">Cy_SysPm_BackupEnableVoltageMeasurement()</a> description  </td><td>Changed the scale number from 40% to 10% to correctly reflect a real value.   </td></tr>
<tr>
<td rowspan="3">4.10 </td><td>Updated the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a> function. </td><td><p class="starttd">Corrected the mechanism for saving/restoring not retained UDB registers in the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca" title="Sets executing CPU to the Deep Sleep mode. ">Cy_SysPm_CpuEnterDeepSleep()</a> function.</p>
<p class="endtd">Now, the <a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep()</a> function does not put CM0+ CPU into Deep Sleep and returns <a class="el" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caaac46b17684c22f6445521c0c0d4e4f7f">CY_SYSPM_SYSCALL_PENDING</a> status, if a syscall operation is pending. This behavior is applicable on multi-CPU devices except CY8C6xx6 and CY8C6xx7.   </p>
</td></tr>
<tr>
<td>Updated the <a class="el" href="group__group__syspm__functions__power.html#gab09936e85606de476a0c379f9548603f">Cy_SysPm_CpuEnterSleep()</a> function. </td><td>Removed the redundant second call of the WFE() instruction on CM4 CPU. This change is applicable for all devices except CY8C6xx6, CY8C6xx7.   </td></tr>
<tr>
<td>Added a new <a class="el" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caaac46b17684c22f6445521c0c0d4e4f7f">CY_SYSPM_SYSCALL_PENDING</a> return status.  </td><td>Expanded driver return statuses for indicating new possible events in the driver.    </td></tr>
<tr>
<td rowspan="6">4.0 </td><td>Flattened the organization of the driver source code into the single source directory and the single include directory.  </td><td>Driver library directory-structure simplification.  </td></tr>
<tr>
<td><p class="starttd">Changed power modes names. See <a class="el" href="group__group__syspm.html#group_syspm_system_power_modes">System Power Modes</a>.</p>
<p>Renamed the following functions:</p><ul>
<li>Cy_SysPm_Sleep to Cy_SysPm_CpuEnterSleep</li>
<li>Cy_SysPm_DeepSleep to Cy_SysPm_CpuEnterDeepSleep</li>
<li>Cy_SysPm_Hibernate to Cy_SysPm_SystemEnterHibernate</li>
<li>Cy_SysPm_SleepOnExit to Cy_SysPm_CpuSleepOnExit</li>
<li>Cy_SysPm_EnterLowPowerMode to Cy_SysPm_SystemSetMinRegulatorCurrent</li>
<li>Cy_SysPm_ExitLowPowerMode to Cy_SysPm_SystemSetNormalRegulatorCurrent</li>
<li>Cy_SysPm_IsLowPower to Cy_SysPm_IsSystemUlp</li>
</ul>
<p class="endtd">For all renamed functions, added BWC macros to simplify migration.  </p>
</td><td>Device power modes simplification  </td></tr>
<tr>
<td>Added the following functions:<ul>
<li>Cy_SysPm_LdoSetMode</li>
<li>Cy_SysPm_LdoGetMode</li>
<li>Cy_SysPm_WriteVoltageBitForFlash</li>
<li>Cy_SysPm_SaveRegisters</li>
<li>Cy_SysPm_RestoreRegisters</li>
<li>Cy_SysPm_CpuSendWakeupEvent</li>
<li>Cy_SysPm_SystemIsMinRegulatorCurrentSet</li>
<li>Cy_SysPm_SystemEnterLp</li>
<li>Cy_SysPm_SystemEnterUlp</li>
<li>Cy_SysPm_IsSystemLp  </li>
</ul>
</td><td>Added new functionality to configure device power modes  </td></tr>
<tr>
<td>Callback mechanism changes:<ul>
<li>Removed the limitation for numbers of registered callbacks. Previously it was possible to register up to 32 callbacks. Now the maximum registered callbacks is not limited by the SysPm driver.</li>
<li>Internal enhancement in callback execution flow.</li>
<li><b>Changes with BWC issues</b>:<ol type="1">
<li>Removed the <b>mode</b> element from <a class="el" href="structcy__stc__syspm__callback__params__t.html" title="The structure contains syspm callback parameters. ">cy_stc_syspm_callback_params_t</a> structure. Now this element is a separate parameter in the callback function.</li>
<li>Changed the interface of the callback function, added the cy_en_syspm_callback_mode_t mode parameter:<ul>
<li>was cy_en_syspm_status_t FuncName (<a class="el" href="structcy__stc__syspm__callback__params__t.html" title="The structure contains syspm callback parameters. ">cy_stc_syspm_callback_params_t</a> *callbackParams);</li>
<li>now cy_en_syspm_status_t FuncName (<a class="el" href="structcy__stc__syspm__callback__params__t.html" title="The structure contains syspm callback parameters. ">cy_stc_syspm_callback_params_t</a> *callbackParams, cy_en_syspm_callback_mode_t mode);  </li>
</ul>
</li>
</ol>
</li>
</ul>
</td><td>Callback mechanism enhancements  </td></tr>
<tr>
<td>Added register access layer. Use register access macros instead of direct register access using dereferenced pointers. </td><td>Makes register access device-independent, so that the PDL does not need to be recompiled for each supported part number.  </td></tr>
<tr>
<td>Added <a class="el" href="group__group__syspm.html#group_syspm_migration_guide_for_syspm_4_0">Migration Guide: Moving to SysPm v4.0</a>. </td><td>Provided a guidance for migrating to the latest SysPm driver version  </td></tr>
<tr>
<td rowspan="2">3.0 </td><td><p class="starttd">Removed three functions:</p><ul>
<li>Cy_SysPm_Cm4IsLowPower</li>
<li>Cy_SysPm_Cm0IsLowPower</li>
<li>Cy_SysPm_IoFreeze</li>
</ul>
<p class="endtd">Removed the following macros:</p><ul>
<li>CY_SYSPM_STATUS_CM0_LOWPOWER</li>
<li>CY_SYSPM_STATUS_CM4_LOWPOWER  </li>
</ul>
</td><td><p class="starttd">Removed the two functions Cy_SysPm_Cm4IsLowPower, Cy_SysPm_Cm0IsLowPower because low power mode is related to the device and not to the CPU. The function Cy_SysPm_IsSystemUlp must be used instead of these two functions.</p>
<p class="endtd">Removed Cy_SysPm_IoFreeze because the are no known use cases with IOs freeze in power modes, except Hibernate. In Hibernate power mode, the IOs are frozen automatically.   </p>
</td></tr>
<tr>
<td>Corrected the syspm callback mechanism behavior. Now callbacks with CY_SYSPM_AFTER_TRANSITION mode are executed from the last registered to the first registered. Previously callbacks with CY_SYSPM_AFTER_TRANSITION mode were executed from last executed to the first registered.  </td><td>Corrected the syspm callbacks execution sequence  </td></tr>
<tr>
<td>2.21 </td><td>Removed saving/restoring the SysClk measurement counters while in Deep Sleep routine  </td><td>Removed possible corruption of SysClk measurement counters if the core wakes up from the Deep Sleep.   </td></tr>
<tr>
<td>2.20 </td><td><br />
<ul>
<li>Added support for changing core voltage when the protection context is other that zero. Such support is available only for devices that support modifying registers via syscall.</li>
<li>For preproduction PSoC 6 devices the changing core voltage is prohibited when the protection context is other than zero.</li>
<li><p class="startli">Updated the following functions. They now have a <a class="el" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> return value and use a syscall:</p><ul>
<li>Cy_SysPm_LdoSetVoltage</li>
<li>Cy_SysPm_BuckSetVoltage1</li>
<li>Cy_SysPm_BuckEnable</li>
</ul>
<p class="startli">No backward compatibility issues.</p>
</li>
<li>Added new CY_SYSPM_CANCELED element in the <a class="el" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a>.</li>
<li>Documentation updates.</li>
<li>Added warning that Cy_SysPm_PmicDisable(CY_SYSPM_PMIC_POLARITY_LOW) is not supported by hardware.  </li>
</ul>
</td><td><p class="starttd">Added support for changing the core voltage in protection context higher than zero (PC &gt; 0).</p>
<p class="endtd">Documentation update and clarification   </p>
</td></tr>
<tr>
<td>2.10 </td><td><br />
<ul>
<li>Changed names for all Backup, Buck-related functions, defines, and enums</li>
<li>Changed next power mode function names: Cy_SysPm_EnterLowPowerMode Cy_SysPm_ExitLpMode Cy_SysPm_SetHibWakeupSource Cy_SysPm_ClearHibWakeupSource Cy_SysPm_GetIoFreezeStatus</li>
<li>Changed following enumeration names: cy_en_syspm_hib_wakeup_source_t cy_en_syspm_simo_buck_voltage1_t cy_en_syspm_simo_buck_voltage2_t</li>
<li>Updated Power Modes documentation section</li>
<li>Added Low Power Callback Managements section</li>
<li>Documentation edits  </li>
</ul>
</td><td><br />
<ul>
<li>Improvements made based on usability feedback</li>
<li>Documentation update and clarification   </li>
</ul>
</td></tr>
<tr>
<td>2.0 </td><td>Enhancement and defect fixes:<ul>
<li>Added input parameter(s) validation to all public functions</li>
<li>Removed "_SysPm_" prefixes from the internal functions names</li>
<li>Changed the type of elements with limited set of values, from uint32_t to enumeration</li>
<li>Enhanced syspm callback mechanism</li>
<li>Added functions to control:<ul>
<li>Power supply for the Vddbackup</li>
<li>Supercapacitor charge</li>
<li>Vddbackup measurement by ADC  </li>
</ul>
</li>
</ul>
</td><td></td></tr>
<tr>
<td>1.0 </td><td>Initial version </td><td></td></tr>
</table>
<h2><a class="anchor" id="group_syspm_migration_guide_for_syspm_4_0"></a>
Migration Guide: Moving to SysPm v4.0</h2>
<p>This section provides a guideline to migrate from v2.21 to v4.0 of the SysPm driver.</p>
<h3><a class="anchor" id="group_syspm_migration_into_4_0_intro"></a>
Introduction</h3>
<p>If your application currently uses SysPm v2.21 APIs, you must migrate to SysPm v4.0 so that your application continues to operate.</p>
<p>Take a few minutes to review the following information:</p><ul>
<li>The APIs related to PSoC 6 <a class="el" href="group__group__syspm.html#group_syspm_power_modes">Power Modes</a> are changed. Old power modes APIs function names are now deprecated and should not be used in new applications.</li>
<li>The <a class="el" href="group__group__syspm.html#group_syspm_cb">SysPm Callbacks</a> mechanism is changed. The mode element is removed from <a class="el" href="structcy__stc__syspm__callback__params__t.html" title="The structure contains syspm callback parameters. ">cy_stc_syspm_callback_params_t</a> structure. Now this element is a separate parameter in the callback function.</li>
</ul>
<h3><a class="anchor" id="group_syspm_migration_into_4_0_names"></a>
Migrating to new power modes APIs.</h3>
<p>The table below shows the new APIs names that should be used in the application instead of old names:</p>
<table class="doxtable">
<tr>
<th>SysPm v2.21 API name</th><th>SysPm v4.0 API name</th><th>Comment </th></tr>
<tr>
<td>Cy_SysPm_Sleep </td><td><a class="el" href="group__group__syspm__functions__power.html#gab09936e85606de476a0c379f9548603f">Cy_SysPm_CpuEnterSleep</a> </td><td>Renamed, no functional changes  </td></tr>
<tr>
<td>Cy_SysPm_DeepSleep </td><td><a class="el" href="group__group__syspm__functions__power.html#ga5150c28fe4d2626720c1fbf74b3111ca">Cy_SysPm_CpuEnterDeepSleep</a> </td><td>Renamed, no functional changes  </td></tr>
<tr>
<td>Cy_SysPm_Hibernate </td><td><a class="el" href="group__group__syspm__functions__power.html#gae97647a28c370674ba57d451d21d1c51">Cy_SysPm_SystemEnterHibernate</a> </td><td>Renamed, no functional changes  </td></tr>
<tr>
<td>Cy_SysPm_SleepOnExit </td><td><a class="el" href="group__group__syspm__functions__power.html#ga7c50f7236c3a6a7b75a7d915f8ebb089">Cy_SysPm_CpuSleepOnExit</a> </td><td>Renamed, no functional changes  </td></tr>
<tr>
<td>Cy_SysPm_IsLowPower </td><td><a class="el" href="group__group__syspm__functions__power__status.html#gaffdaf11b8565e3838c8533803eedb70e">Cy_SysPm_IsSystemUlp</a> </td><td>Now this function checks whether the device is in ULP mode  </td></tr>
<tr>
<td>Cy_SysPm_EnterLowPowerMode </td><td><a class="el" href="group__group__syspm__functions__power.html#ga3bde7056544d0ada3da80a0f58fefab9">Cy_SysPm_SystemSetMinRegulatorCurrent</a> </td><td>The low power active mode does not exist anymore. The <a class="el" href="group__group__syspm.html#group_syspm_system_reg_curr_mode">System Regulator Current Mode</a> is implemented instead   </td></tr>
<tr>
<td>Cy_SysPm_ExitLowPowerMode </td><td><a class="el" href="group__group__syspm__functions__power.html#ga54112d6ea4d40ad241923ee7068f5363">Cy_SysPm_SystemSetNormalRegulatorCurrent</a> </td><td>The low power active mode does not exist anymore. The <a class="el" href="group__group__syspm.html#group_syspm_system_reg_curr_mode">System Regulator Current Mode</a> is implemented instead  </td></tr>
<tr>
<td>Cy_SysPm_Cm4IsLowPower </td><td>Removed </td><td>This function is removed because low power mode is related to the system and not to the CPU  </td></tr>
<tr>
<td>Cy_SysPm_Cm0IsLowPower </td><td>Removed </td><td>This function is removed because low power mode is related to the system and not to the CPU  </td></tr>
<tr>
<td>Cy_SysPm_IoFreeze </td><td>Removed </td><td>This function is removed because there are no known use cases to freeze in power modes other than Hibernate  </td></tr>
</table>
<p>In addition to renamed power modes APIs, the following defines and enum elements names are changed: </p><table class="doxtable">
<tr>
<th>SysPm v2.21 defines</th><th>SysPm v4.0 defines</th><th>Comment </th></tr>
<tr>
<td>CY_SYSPM_ENTER_LP_MODE </td><td>CY_SYSPM_ULP </td><td>The <a class="el" href="group__group__syspm__data__enumerates.html#ga8c2960c0164ead1cfa86e7d6846b6ff0">cy_en_syspm_callback_type_t</a> element is renamed to align callback types names to new power modes names  </td></tr>
<tr>
<td>CY_SYSPM_EXIT_LP_MODE </td><td>CY_SYSPM_LP </td><td>The <a class="el" href="group__group__syspm__data__enumerates.html#ga8c2960c0164ead1cfa86e7d6846b6ff0">cy_en_syspm_callback_type_t</a> element is renamed to align callback types names to new power modes names </td></tr>
<tr>
<td>CY_SYSPM_STATUS_SYSTEM_LOWPOWER </td><td>CY_SYSPM_STATUS_SYSTEM_ULP </td><td>Status define, renamed to align new power modes names and abbreviations  </td></tr>
</table>
<h3><a class="anchor" id="group_syspm_migration_into_4_0_callbacks"></a>
Migrating to SysPm v4.0 callbacks</h3>
<p>Review this section if your application is using the syspm callback mechanism.</p>
<p>To migrate to SysPm v4.0 callbacks you need to perform the following steps:</p><ol type="1">
<li><p class="startli">Remove mode element from all <a class="el" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> structures defined in your application. In SysPm v2.21 this structure is: </p><div class="fragment"><div class="line"><a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> deepSleepParam1 =</div><div class="line">{</div><div class="line">    <a class="code" href="group__group__syspm__data__enumerates.html#ggae06cd8869fe61d709ad6145ca9f3cd63ab7ec706d80b347433d0063f2a8115784">CY_SYSPM_CHECK_READY</a>,</div><div class="line">    &amp;HW1_address,</div><div class="line">    &amp;context</div><div class="line">};</div></div><!-- fragment --><p class="startli">In SysPm v4.0 this structure should be: </p><div class="fragment"><div class="line"><a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> deepSleepParam1 =</div><div class="line">{</div><div class="line">    &amp;HW1_address,</div><div class="line">    &amp;context</div><div class="line">};</div></div><!-- fragment --></li>
<li>Update all defined syspm callback function prototypes to have two parameters instead of one. The SysPm v2.21 callback function prototype is: <div class="fragment"><div class="line"><a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> Func1 (<a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> *callbackParams);</div></div><!-- fragment --> The SysPm v4.0 callback function prototype should be: <div class="fragment"><div class="line"><a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> Func1 (<a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> *callbackParams, <a class="code" href="group__group__syspm__data__enumerates.html#gae06cd8869fe61d709ad6145ca9f3cd63">cy_en_syspm_callback_mode_t</a> mode);</div></div><!-- fragment --></li>
<li>Change the syspm callback function implementation to not use a mode value as an element of the callbackParams structure, but, as separate function parameter: SysPm v2.21 callback function implementation: <div class="fragment"><div class="line"><a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> Func1(<a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> *callbackParams)</div><div class="line">{</div><div class="line">    <a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caa5e406c6cb40fdf6663df0208737d4f11">CY_SYSPM_FAIL</a>;</div><div class="line"></div><div class="line">    <span class="keywordflow">switch</span>(callbackParams-&gt;mode)</div><div class="line">    {</div><div class="line">        <span class="keywordflow">case</span> <a class="code" href="group__group__syspm__data__enumerates.html#ggae06cd8869fe61d709ad6145ca9f3cd63ab7ec706d80b347433d0063f2a8115784">CY_SYSPM_CHECK_READY</a>:</div><div class="line">        ...</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordflow">return</span> (retVal);</div><div class="line">}</div></div><!-- fragment --> SysPm v4.0 callback function implementation: <div class="fragment"><div class="line"><a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> Func1(<a class="code" href="structcy__stc__syspm__callback__params__t.html">cy_stc_syspm_callback_params_t</a> *callbackParams, <a class="code" href="group__group__syspm__data__enumerates.html#gae06cd8869fe61d709ad6145ca9f3cd63">cy_en_syspm_callback_mode_t</a> mode)</div><div class="line">{</div><div class="line">    <a class="code" href="group__group__syspm__data__enumerates.html#ga601b1cb722cb091133caf33d8ab235ca">cy_en_syspm_status_t</a> retVal = <a class="code" href="group__group__syspm__data__enumerates.html#gga601b1cb722cb091133caf33d8ab235caa5e406c6cb40fdf6663df0208737d4f11">CY_SYSPM_FAIL</a>;</div><div class="line"></div><div class="line">    <span class="keywordflow">switch</span>(mode)</div><div class="line">    {</div><div class="line">        <span class="keywordflow">case</span> <a class="code" href="group__group__syspm__data__enumerates.html#ggae06cd8869fe61d709ad6145ca9f3cd63ab7ec706d80b347433d0063f2a8115784">CY_SYSPM_CHECK_READY</a>:</div><div class="line">        ...</div><div class="line">    }</div><div class="line"></div><div class="line">    <span class="keywordflow">return</span> (retVal);</div><div class="line">}</div></div><!-- fragment --> After the changes above are done, you have successfully migrated to SysPm v4.0.</li>
</ol>
<p>Do not forget to review newly added functionality for SysPm v4.0 in the <a class="el" href="group__group__syspm.html#group_syspm_changelog">Changelog</a>. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
API Reference</h2></td></tr>
<tr class="memitem:group__group__syspm__pdcm"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__syspm__pdcm.html">PDCM (Power Dependency Control Matrix)</a></td></tr>
<tr class="memdesc:group__group__syspm__pdcm"><td class="mdescLeft">&#160;</td><td class="mdescRight">PDCM driver provides APIs for controlling the Power Dependency Control Matrix across Power Domains. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__group__syspm__ppu"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__syspm__ppu.html">PPU (Power Policy Unit)</a></td></tr>
<tr class="memdesc:group__group__syspm__ppu"><td class="mdescLeft">&#160;</td><td class="mdescRight">Power Domain PPU driver is a platform dependent driver on top of ARM PPU Driver. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__group__syspm__btss"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__syspm__btss.html">BTSS Host API(Bluetooth Sub System Host API)</a></td></tr>
<tr class="memdesc:group__group__syspm__btss"><td class="mdescLeft">&#160;</td><td class="mdescRight">BTSS PDL Driver helps in controlling the BTSS from the MCU side. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__group__syspm__macros"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__syspm__macros.html">Macros</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__group__syspm__functions"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__syspm__functions.html">Functions</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__group__syspm__data__structures"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__syspm__data__structures.html">Data Structures</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:group__group__syspm__data__enumerates"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__syspm__data__enumerates.html">Enumerated Types</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
